Research notes on every problem, and a library of the papers behind them. Built from the open erdos repository.
Updated
We prove
L104.
Natural logarithms are used throughout, ℓ and q denote primes,
P+(n) is the largest prime factor of n, and V is the set of
values of Euler's function.
The source theorem and the basin deduction
Banks, Ford, Luca, Pappalardi and Shparlinski, Values of the Euler Function
in Various Sequences, Monatshefte für Mathematik 146 (2005), 1–19,
Theorem 4.1
(author manuscript, pp. 14–15,
accessed 2026-10-15),
bound the set
L(x)={p≤x:p prime,φ(n)=p−1 for some n∈/{p,2p}}
by x(logx)−2exp((κ+o(1))(logloglogx)2), with
κ=0.8178…. The definition on manuscript page 3 and the proof
on pages 14–15 were read. We use this published theorem as an input;
the original totient-counting and sieve results on which it rests have
not been independently audited here. Since
(logloglogx)2=o(loglogx), this is
Oδ(x/(logx)2−δ) for every δ>0.
Let p be odd. If its basin is {p,2p}, every solution of
φ(n)=p−1 belongs to this set. Conversely, suppose these are the
only solutions. No positive integer has T(n)=2p: φ(n) is even
for n≥3, while T(1)=T(2)=2. A first arrival at p must therefore
come directly from 2p. Thus its whole basin is {p,2p}.
The prime 2 contributes at most one exception. The source theorem and
π(x)≍x/logx prove the claimed relative density among primes.
The union of the two-element basins contains at most
π(x)+π(x/2)=O(x/logx) integers up to x, proving its natural
density is zero. Every integer reaches a prime: for composite n>2,
T(n)<n, and T(1)=2. Hence the complementary union, over exceptional
terminal primes, has density one. A countable union of zero-density sets
can have density one, so this does not force any fixed basin to be infinite
or to have positive density.
Supplementary reconstruction of the weaker count
The following argument records the same largest-prime split used in the
source proof, with a weaker totient sparsity estimate. It is an
author-recorded reconstruction, not a new exceptional-prime theorem.
Inputs
The proof uses the following classical results.
Size of n/φ(n).n/φ(n)≤2loglogn for all large
n, since limsupn/(φ(n)loglogn)=eγ<2 (Landau).
Two-prime upper-bound sieve. There is an absolute constant C1 such
that for every integer m≥2 and every real Y≥2,
#{t≤Y:t and m(t−1)+1 both prime}≤C1(logY)2Yℓ∣m(m−1)∏(1−ℓ1)−1.
This is Brun's or Selberg's upper-bound sieve (Halberstam and Richert,
Sieve Methods, 1974, Chapters 2 and 3) applied to the values of
F(t)=t(mt−m+1) for t≤Y, sifted by the primes up to Y1/4.
The number ρ(ℓ) of residues tmodℓ with
F(t)≡0 is 1 when ℓ∣m(m−1) (for ℓ∣m the second
factor is ≡1; for ℓ∣m−1 it is ≡t, the root of the
first) and 2 otherwise, so ρ(ℓ)<ℓ for every ℓ, and the
remainder at a squarefree d is at most ρ(d), independently of m.
The sieve product is
$\prod_{\ell\le Y^{1/4}}(1-\rho(\ell)/\ell)\ll(\log Y)^{-2}
\prod_{\ell\mid m(m-1)}(1-1/\ell)^{-1}$, and the t≤Y1/4 add at
most Y1/4.
3. Sparsity of totient values. For every δ>0 and all large t,
#(V∩[1,t])<t/(logt)1−δ (Erdős 1935, on
his paper's card;
Ford's Theorem 1 on
the Ford 1998 card
gives the true order). By partial summation,
Rankin's bound. For X≥y≥2 and 0<σ<1, the number
Ψ(X,y) of y-smooth integers up to X is at most
∑(X/n)σ over all y-smooth n, that is
Xσ∏ℓ≤y(1−ℓ−σ)−1. Take
σ=1−1/(2logy) with y≥e2. For ℓ≤y,
$\ell^{-\sigma}=\ell^{-1}e^{\log\ell/(2\log y)}\le\ell^{-1}
(1+\log\ell/\log y)$, so Mertens' theorems give
∑ℓ≤yℓ−σ=loglogy+O(1); as 2σ≥3/2, the
product is O(logy), and
Ψ(X,y)≪Xe−u/2logy,u=logylogX.(2)
The cases
Let x be large, and put
ε=12loglogx1,y=x2ε=exp(6loglogxlogx).
Call a prime p≤x exceptional if some n∈/{p,2p} has
φ(n)=p−1. Discard p=2 at a cost of one, and for each remaining
exceptional prime fix such an n. Since φ(n)≥n/2, we
have n≤2x2, and input 1 gives
n≤X:=3xloglogx. Let q=P+(n).
A power of two. If q=2, then n=2b and p=2b−1+1; there are at
most log2x+1 such primes.
Otherwise q is odd; let qa be the exact power of q dividing n.
Case A: q≤y. Then n is a y-smooth integer up to X, and n
determines p=φ(n)+1. Here $u=\log X/\log y\ge1/(2\varepsilon)
=6\log\log x$, so (2) gives at most
≪3xloglogx⋅(logx)−3⋅6loglogxlogx≪(logx)2x
exceptional primes in this case.
Case B: q>y and a≥2. Each possible n≤X is divisible by
q2 for some q>y. Each n determines p=φ(n)+1, so their
contribution is at most
q>y∑⌊q2X⌋≤Xj>y∑j21≪yxloglogx≪(logx)10x.
Here y exceeds every fixed power of logx for all sufficiently large
x.
Case C: q>y and a=1. Write n=qn′ with q∤n′. If
n′∈{1,2}, then φ(n)=q−1=p−1, so q=p and n∈{p,2p},
which is excluded. So n′≥3, and m=φ(n′) is a totient value with
m≥2 and
p−1=(q−1)m,q−1≤x/m.
Every exceptional prime of this case is therefore m(q−1)+1 for some
m∈V with 2≤m≤x and some prime q with
y<q≤x/m+1 such that m(q−1)+1 is prime. Only m with
Y:=x/m+1≥y contribute. For those m,
logY≥logx/(6loglogx), and
Y≤2x/m. Since m and m−1 are coprime,
ℓ∣m(m−1)∏(1−ℓ1)−1=φ(m)m⋅φ(m−1)m−1≪(loglogx)2
by input 1. Input 2 bounds the number of these q by
≪x(loglogx)4/(m(logx)2), uniformly in m. Summing over
m∈V with (1),
#{exceptional p≤x in case C}≪δ(logx)2−δx(loglogx)4.
Conclusion of the reconstruction
Adding the cases, the number of exceptional primes up to x is
≪δx(loglogx)4/(logx)2−δ for every δ>0, hence
at most Cδx/(logx)2−2δ; replacing δ by δ/2
and enlarging Cδ to cover small x gives the bound in the
statement. As π(x)≫x/logx, the exceptional primes have relative
density zero.
Let p be a prime that is not exceptional. The integers n with
T(n)=φ(n)+1=p are those with φ(n)=p−1, namely p and 2p.
No n has T(n)=2p, because φ(n) is even for n≥3 and
φ(1)=φ(2)=1, while 2p−1 is odd and greater than 1. If some
iterate of n equals p, take the first one, Tk(n)=p. For k≥1 the
previous iterate is a T-preimage of p other than p, so it is 2p,
and then k=1 because 2p has no preimage. Hence n∈{p,2p}, and
both elements reach p.