Miscellaneous arithmetic Functions #
This file defines some simple examples of arithmetic functions (functions ℕ → R vanishing at
0, considered as a ring under Dirichlet convolution). Note that the Von Mangoldt and Möbius
functions are in separate files.
Main Definitions #
σ kis the arithmetic function such thatσ k x = ∑ y ∈ divisors x, y ^ kfor0 < x.pow kis the arithmetic function such thatpow k x = x ^ kfor0 < x.idis the identity arithmetic function onℕ.ω nis the number of distinct prime factors ofn.Ω nis the number of prime factors ofncounted with multiplicity.
Notation #
The arithmetic functions σ, ω and Ω have Greek letter names.
This notation is scoped to the separate locales ArithmeticFunction.sigma for σ,
ArithmeticFunction.omega for ω and ArithmeticFunction.Omega for Ω, to allow for selective
access.
Tags #
arithmetic functions, dirichlet convolution, divisors
The map $n \mapsto \prod_{p \mid n} f(p)$ as an arithmetic function
Equations
- ArithmeticFunction.prodPrimeFactors f = { toFun := fun (d : ℕ) => if d = 0 then 0 else ∏ p ∈ d.primeFactors, f p, map_zero' := ⋯ }
Instances For
∏ᵖ p ∣ n, f p is custom notation for prodPrimeFactors f n
Equations
- One or more equations did not get rendered due to their size.
Instances For
The identity on ℕ as an ArithmeticFunction.
Equations
- ArithmeticFunction.id = { toFun := id, map_zero' := ArithmeticFunction.id._proof_1 }
Instances For
σ k n is the sum of the kth powers of the divisors of n
Equations
Instances For
σ k n is the sum of the kth powers of the divisors of n
Equations
- ArithmeticFunction.sigma.termσ = Lean.ParserDescr.node `ArithmeticFunction.sigma.termσ 1024 (Lean.ParserDescr.symbol "σ")
Instances For
Ω n is the number of prime factors of n.
Equations
- ArithmeticFunction.cardFactors = { toFun := fun (n : ℕ) => n.primeFactorsList.length, map_zero' := ArithmeticFunction.cardFactors._proof_1 }
Instances For
Ω n is the number of prime factors of n.
Equations
- ArithmeticFunction.Omega.termΩ = Lean.ParserDescr.node `ArithmeticFunction.Omega.termΩ 1024 (Lean.ParserDescr.symbol "Ω")
Instances For
ω n is the number of distinct prime factors of n.
Equations
- ArithmeticFunction.cardDistinctFactors = { toFun := fun (n : ℕ) => n.primeFactorsList.dedup.length, map_zero' := ArithmeticFunction.cardDistinctFactors._proof_1 }
Instances For
ω n is the number of distinct prime factors of n.
Equations
- ArithmeticFunction.omega.termω = Lean.ParserDescr.node `ArithmeticFunction.omega.termω 1024 (Lean.ParserDescr.symbol "ω")
Instances For
An O(N) formula for the sum of the number of divisors function.
Extension for ArithmeticFunction.sigma.
Equations
- One or more equations did not get rendered due to their size.