Kluyver's formula for Ramanujan's sum
ProvedVino.ramanujan_eq_kluyveranalytic-number-theorycircle-methodnumber-theoryramanujan-sums
Kluyver's closed formula: for and any integer ,
The statement is written as a sum over all divisors of , with the summand set to unless , which is the same thing.
This is the single most useful fact about Ramanujan sums. It shows at once that is an integer, that it depends on only through , that , and — since it exhibits as a Möbius-type convolution — that is multiplicative. It also gives the bound used to control the tail of the singular series.
Preamble
import Definitions.Def_Vino_ramanujan import Mathlib.NumberTheory.Divisors import Mathlib.NumberTheory.ArithmeticFunction.Moebius import Mathlib.Data.Nat.Totient open Finset
Formal statement
namespace Vino
theorem ramanujan_eq_kluyver {q : ℕ} (hq : 0 < q) (n : ℤ) :
ramanujan q n
= ∑ d ∈ q.divisors,
(if (d : ℤ) ∣ n then (d : ℂ) else 0)
* ((ArithmeticFunction.moebius (q / d) : ℤ) : ℂ) := by sorry
end VinoSource
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th ed., Oxford University Press, 2008, Section 16.6, Theorem 271 (Ramanujan's sum c_q(n) = sum over d | gcd(q,n) of d * mu(q/d)); J. C. Kluyver, Some formulae concerning the integers less than n and prime to n, Proc. Royal Netherlands Academy 9 (1906), 408-414.