An elementary lower bound for Euler's totient function, and the totient of a square #
Euler's product formula φ n / n = ∏_{p ∣ n} (1 - 1/p) together with the fact that the i-th
smallest prime factor of n is at least i + 1 gives φ n / n ≥ 1 / (ω n + 1), where ω n is the
number of distinct prime factors; since 2 ^ ω n ≤ n, also φ n / n ≥ 1 / (log₂ n + 1). The
bound is much weaker than the optimal order φ n / n ≫ 1 / log log n (Hardy and Wright's
Theorem 328, as cited in de Wolf, §5.3), but it already shows that a uniformly random
residue modulo n is a unit with inverse-logarithmic probability, as needed in the classical
post-processing of Shor's algorithm. The file also records φ(n ^ 2) = n * φ(n).
Main results #
Nat.prod_le_card_add_one_mul_prod_sub_one:∏ p ∈ s, p ≤ (#s + 1) * ∏ p ∈ s, (p - 1)for a finsetsof numbers at least2.Nat.le_totient_mul_card_primeFactors_add_one:n ≤ φ n * (#n.primeFactors + 1).Nat.card_primeFactors_le_log:#n.primeFactors ≤ Nat.log 2 n.Nat.le_totient_mul_log_add_one:n ≤ φ n * (Nat.log 2 n + 1).Nat.totient_sq:φ (n ^ 2) = n * φ n.
References #
If every element of s is at least 2, then ∏ p ∈ s, p ≤ (#s + 1) * ∏ p ∈ s, (p - 1): the
i-th smallest element is at least i + 1, so ∏ p ∈ s, (1 - 1/p) ≥ ∏ i < #s, (1 - 1/(i+2)) = 1 / (#s + 1).
An elementary lower bound for Euler's totient function: n ≤ φ n * (ω n + 1), where
ω n = #n.primeFactors; equivalently φ n / n ≥ 1 / (ω n + 1).
A number has at most log₂ n distinct prime factors.