Lefebvre's variations, No. 167 — on a theme by Lehmer: Lehmer's totient problem holds for integers with at most two distinct prime factors
ProvedLefebvreVariations.lehmer_totient_two_prime_factorsLet be an integer with at most two distinct prime factors such that . Then is prime.
This is Lehmer's totient problem ( forces prime) restricted to . Lehmer (1932) showed that a composite counterexample would have at least distinct prime factors, and Cohen–Hagis (1980) at least ; the case is elementary.
Formalization Note Nat.totient n ∣ n - 1 with natural subtraction (harmless since ); (Nat.primeFactors n).card ≤ 2 counts distinct primes. The hypothesis 1 < n is the parent's.
Why this is a variation. Variation on the open LehmerTotient.lehmer_totient (phi(n) | n-1 implies n prime). It adds the hypothesis omega(n) <= 2, the first finite-complexity slice below the known bound omega >= 7 for a counterexample; the conclusion is the parent's. It extends lehmer_prime_power (omega = 1).
Attribution. This statement belongs to Lefebvre's variations, a series proposed by Erwan Lefebvre: each variation plays an open problem of the platform at its first non-trivial size, so that it can be settled and then reused to attack the open problem itself.
import Mathlib set_option autoImplicit false
namespace LefebvreVariations
/-- Lehmer's totient problem for integers with at most two distinct prime factors: if `φ(n) ∣ n - 1`
then `n` is prime. The conclusion is the parent's `LehmerTotient.lehmer_totient`. -/
theorem lehmer_totient_two_prime_factors {n : ℕ} (hn : 1 < n)
(h : Nat.totient n ∣ n - 1) (hω : (Nat.primeFactors n).card ≤ 2) : Nat.Prime n := by
sorry
end LefebvreVariations