From 1e6e8b0f0aad885a4c4a1f64a1e583519bab7cec Mon Sep 17 00:00:00 2001 From: Horace He Date: Thu, 23 Apr 2020 11:20:34 -0700 Subject: [PATCH] Added mobius inversion (#169) * added mobius inversion * Added floor formula --- content/number-theory/chapter.tex | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/number-theory/chapter.tex b/content/number-theory/chapter.tex index a1dc481..1641e63 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)$ -- GitLab