Skip to content
DARC
■ Change #154 · wiki.edited

Lehmer's totient problem: is there a composite n with φ(n) dividing n − 1?: Normalize Markdown to canonical form

by DARC wiki2026-10-22 20:31:18 UTCOpen the page →
stateOfArt
− No composite solution is known. Lehmer (1932) showed a solution must be odd, squarefree, have at least 7 distinct prime factors and be a Carmichael number. Cohen and Hagis (1980) raised the prime-factor count to at least 14. Hagis (1988) showed that if $3$ divides a solution then it exceeds $10^{1{,}937{,}042}$ and has at least 298,848 prime factors; Burcsi, Czirbusz and Farkas (2011, *Ann. Univ. Sci. Budapest. Sect. Comput.* 35) raised this to more than $10^{360{,}000{,}000}$ and at least 40 million prime factors. Luca and Pomerance (2011) bound the number of solutions up to $X$ by roughly $X^{1/2}/(\log X)^{1/2}$. Because solutions are rare or absent and any search must reach enormous sizes, neither computation nor current theory settles it.
+ No composite solution is known. Lehmer (1932) showed a solution must be odd, squarefree, have at least 7 distinct prime factors and be a Carmichael number. Cohen and Hagis (1980) raised the prime-factor count to at least 14. Hagis (1988) showed that if $3$ divides a solution then it exceeds $10^{1{,}937{,}042}$ and has at least 298,848 prime factors; Burcsi, Czirbusz and Farkas (2011, _Ann. Univ. Sci. Budapest. Sect. Comput._ 35) raised this to more than $10^{360{,}000{,}000}$ and at least 40 million prime factors. Luca and Pomerance (2011) bound the number of solutions up to $X$ by roughly $X^{1/2}/(\log X)^{1/2}$. Because solutions are rare or absent and any search must reach enormous sizes, neither computation nor current theory settles it.
explainer.student
− **Euler's totient.** For a positive integer $n$, $\varphi(n)$ counts the numbers from $1$ to $n$ that share no factor with $n$ other than 1 (they are *coprime* to $n$). For example $\varphi(10)=4$: the numbers 1, 3, 7, 9. If $p$ is prime, every number from 1 to $p-1$ is coprime to it, so $\varphi(p)=p-1$, and in particular $\varphi(p)$ divides $p-1$.
+ **Euler's totient.** For a positive integer $n$, $\varphi(n)$ counts the numbers from $1$ to $n$ that share no factor with $n$ other than 1 (they are _coprime_ to $n$). For example $\varphi(10)=4$: the numbers 1, 3, 7, 9. If $p$ is prime, every number from 1 to $p-1$ is coprime to it, so $\varphi(p)=p-1$, and in particular $\varphi(p)$ divides $p-1$.
− **The question.** Lehmer asked in 1932 whether this divisibility can happen for a *composite* $n$ (a whole number above 1 that is not prime): is there a composite $n$ with $\varphi(n)\mid n-1$? If not, the condition is an exact test for primality. In Lean: `∃ n > 1, ¬Prime n ∧ Nat.totient n ∣ n - 1`.
+ **The question.** Lehmer asked in 1932 whether this divisibility can happen for a _composite_ $n$ (a whole number above 1 that is not prime): is there a composite $n$ with $\varphi(n)\mid n-1$? If not, the condition is an exact test for primality. In Lean: `∃ n > 1, ¬Prime n ∧ Nat.totient n ∣ n - 1`.
**Try a few.** For a product of distinct primes, $\varphi(p_1p_2\cdots p_r)=(p_1-1)(p_2-1)\cdots(p_r-1)$. For $n=15=3\cdot5$: $\varphi(15)=8$, and 14 is not a multiple of 8. For $n=561=3\cdot11\cdot17$: $\varphi(561)=2\cdot10\cdot16=320$, and 560 is not a multiple of 320. Requiring $n-1$ to be a multiple of the whole product $\prod(p_i-1)$ is a strong condition, and no composite example has ever been found.
− **What a solution would have to look like.** Lehmer proved that a solution must be odd, have no repeated prime factor (*squarefree*) and have at least 7 distinct prime factors; Cohen and Hagis (1980) raised this to 14. Each $p_i-1$ divides $\varphi(n)$ and hence $n-1$, which makes $n$ a *Carmichael number*: a composite that fools Fermat's primality test, because $a^{n-1}$ leaves remainder 1 on division by $n$ for every $a$ coprime to $n$. If 3 divides a solution, it has more than 40 million prime factors (Burcsi, Czirbusz and Farkas, 2011). Luca and Pomerance (2011) showed that solutions, if any exist, are rare: roughly at most $\sqrt X$ of them below $X$.
+ **What a solution would have to look like.** Lehmer proved that a solution must be odd, have no repeated prime factor (_squarefree_) and have at least 7 distinct prime factors; Cohen and Hagis (1980) raised this to 14. Each $p_i-1$ divides $\varphi(n)$ and hence $n-1$, which makes $n$ a _Carmichael number_: a composite that fools Fermat's primality test, because $a^{n-1}$ leaves remainder 1 on division by $n$ for every $a$ coprime to $n$. If 3 divides a solution, it has more than 40 million prime factors (Burcsi, Czirbusz and Farkas, 2011). Luca and Pomerance (2011) showed that solutions, if any exist, are rare: roughly at most $\sqrt X$ of them below $X$.
**Why it is stuck.** These results narrow the shape of a solution without ruling it out, and the remaining candidates are far too large to search.
**How an answer is checked.** A yes-answer is one number with its factorization: Lean can compute $\varphi(n)$ from the factors and check the divisibility with integer arithmetic. A no-answer needs a proof for every $n$. The problem is a cousin of the Agoh–Giuga conjecture, another congruence test for primes whose counterexamples would also have to be Carmichael numbers.
hash aa64fad8496cb85347a7053dd3b5b018fb9e1f5a2600f585779e6976da65a7da
previous 47d69a03a5c2bf02ae044ba85d2de96683e5e0ca8c85e00842dd8565843f52b2