Unverified Commit 1e6e8b0f authored by Horace He's avatar Horace He Committed by GitHub

Added mobius inversion (#169)

* added mobius inversion

* Added floor formula
parent 91b31450
......@@ -48,3 +48,17 @@
$\sum_{d|n} d = O(n \log \log n)$.
The number of divisors of $n$ is at most around 100 for $n < 5e4$, 500 for $n < 1e7$, 2000 for $n < 1e10$, 200\,000 for $n < 1e19$.
\section{Mobius Function}
\[
\mu(n) = \begin{cases} 0 & n \textrm{ is not square free}\\ 1 & n \textrm{ has even number of prime factors}\\ -1 & n \textrm{ has odd number of prime factors}\\\end{cases}
\]
Mobius Inversion:
\[ g(n) = \sum_{d|n} f(d) \Leftrightarrow f(n) = \sum_{d|n} \mu(d)g(n/d) \]
Other useful formulas/forms:
$ \sum_{d | n} \mu(d) = [ n = 1] $ (very useful)
$ g(n) = \sum_{n|d} f(d) \Leftrightarrow f(n) = \sum_{n|d} \mu(d/n)g(d)$
$ g(n) = \sum_{1 \leq m \leq n} f(\left\lfloor\frac{n}{m}\right \rfloor ) \Leftrightarrow f(n) = \sum_{1\leq m\leq n} \mu(m)g(\left\lfloor\frac{n}{m}\right\rfloor)$
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment