diff --git a/content/number-theory/chapter.tex b/content/number-theory/chapter.tex index a1dc481a53e98292dd7b051f2fa79234ad5eb2bb..1641e630a6c7fb2f280e97ada4135c6b641ea8f5 100644 --- a/content/number-theory/chapter.tex +++ b/content/number-theory/chapter.tex @@ -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)$