Wiki
Wiki

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, ℓ\ell and qq denote primes, P+(n)P^+(n) is the largest prime factor of nn, and V\mathcal 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}}\mathcal L(x)=\{p\le x:p\text{ prime},\ \varphi(n)=p-1 \text{ for some }n\notin\{p,2p\}\}

by x(log⁡x)−2exp⁡((κ+o(1))(log⁡log⁡log⁡x)2)x(\log x)^{-2}\exp((\kappa+o(1))(\log\log\log x)^2), with κ=0.8178…\kappa=0.8178\ldots. 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 (log⁡log⁡log⁡x)2=o(log⁡log⁡x)(\log\log\log x)^2=o(\log\log x), this is Oδ(x/(log⁡x)2−δ)O_\delta(x/(\log x)^{2-\delta}) for every δ>0\delta>0.

Let pp be odd. If its basin is {p,2p}\{p,2p\}, every solution of φ(n)=p−1\varphi(n)=p-1 belongs to this set. Conversely, suppose these are the only solutions. No positive integer has T(n)=2pT(n)=2p: φ(n)\varphi(n) is even for n≥3n\ge3, while T(1)=T(2)=2T(1)=T(2)=2. A first arrival at pp must therefore come directly from 2p2p. Thus its whole basin is {p,2p}\{p,2p\}.

The prime 22 contributes at most one exception. The source theorem and π(x)≍x/log⁡x\pi(x)\asymp x/\log x prove the claimed relative density among primes. The union of the two-element basins contains at most π(x)+π(x/2)=O(x/log⁡x)\pi(x)+\pi(x/2)=O(x/\log x) integers up to xx, proving its natural density is zero. Every integer reaches a prime: for composite n>2n>2, T(n)<nT(n)<n, and T(1)=2T(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.

  1. Size of n/φ(n)n/\varphi(n). n/φ(n)≤2log⁡log⁡nn/\varphi(n)\le2\log\log n for all large nn, since lim sup⁡n/(φ(n)log⁡log⁡n)=eγ<2\limsup n/(\varphi(n)\log\log n)=e^{\gamma}<2 (Landau).
  2. Two-prime upper-bound sieve. There is an absolute constant C1C_1 such that for every integer m≥2m\ge2 and every real Y≥2Y\ge2,
#{t≤Y: t and m(t−1)+1 both prime}≤C1Y(log⁡Y)2∏ℓ∣m(m−1)(1−1ℓ)−1.\#\{t\le Y:\ t\text{ and }m(t-1)+1\text{ both prime}\} \le C_1\frac{Y}{(\log Y)^2} \prod_{\ell\mid m(m-1)}\Bigl(1-\frac1\ell\Bigr)^{-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)F(t)=t\,(mt-m+1) for t≤Yt\le Y, sifted by the primes up to Y1/4Y^{1/4}. The number ρ(ℓ)\rho(\ell) of residues t mod ℓt\bmod\ell with F(t)≡0F(t)\equiv0 is 11 when ℓ∣m(m−1)\ell\mid m(m-1) (for ℓ∣m\ell\mid m the second factor is ≡1\equiv1; for ℓ∣m−1\ell\mid m-1 it is ≡t\equiv t, the root of the first) and 22 otherwise, so ρ(ℓ)<ℓ\rho(\ell)<\ell for every ℓ\ell, and the remainder at a squarefree dd is at most ρ(d)\rho(d), independently of mm. 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/4t\le Y^{1/4} add at most Y1/4Y^{1/4}. 3. Sparsity of totient values. For every δ>0\delta>0 and all large tt, #(V∩[1,t])<t/(log⁡t)1−δ\#(\mathcal V\cap[1,t])<t/(\log t)^{1-\delta} (Erdős 1935, on his paper's card; Ford's Theorem 1 on the Ford 1998 card gives the true order). By partial summation,

∑m∈V, m≤x1m=#(V∩[1,x])x+∫1x#(V∩[1,t])t2 dt≪δ1+∫3xdtt(log⁡t)1−δ≪δ(log⁡x)δ.(1)\sum_{m\in\mathcal V,\ m\le x}\frac1m =\frac{\#(\mathcal V\cap[1,x])}x +\int_1^x\frac{\#(\mathcal V\cap[1,t])}{t^2}\,dt \ll_\delta1+\int_{3}^x\frac{dt}{t(\log t)^{1-\delta}} \ll_\delta(\log x)^\delta. \tag{1}
  1. Rankin's bound. For X≥y≥2X\ge y\ge2 and 0<σ<10<\sigma<1, the number Ψ(X,y)\Psi(X,y) of yy-smooth integers up to XX is at most ∑(X/n)σ\sum(X/n)^\sigma over all yy-smooth nn, that is Xσ∏ℓ≤y(1−ℓ−σ)−1X^\sigma\prod_{\ell\le y}(1-\ell^{-\sigma})^{-1}. Take σ=1−1/(2log⁡y)\sigma=1-1/(2\log y) with y≥e2y\ge e^2. For ℓ≤y\ell\le y, $\ell^{-\sigma}=\ell^{-1}e^{\log\ell/(2\log y)}\le\ell^{-1} (1+\log\ell/\log y)$, so Mertens' theorems give ∑ℓ≤yℓ−σ=log⁡log⁡y+O(1)\sum_{\ell\le y}\ell^{-\sigma}=\log\log y+O(1); as 2σ≥3/22\sigma\ge3/2, the product is O(log⁡y)O(\log y), and
Ψ(X,y)≪Xe−u/2log⁡y,u=log⁡Xlog⁡y.(2)\Psi(X,y)\ll Xe^{-u/2}\log y,\qquad u=\frac{\log X}{\log y}. \tag{2}

The cases

Let xx be large, and put

ε=112log⁡log⁡x,y=x2ε=exp⁡(log⁡x6log⁡log⁡x).\varepsilon=\frac1{12\log\log x},\qquad y=x^{2\varepsilon}=\exp\Bigl(\frac{\log x}{6\log\log x}\Bigr).

Call a prime p≤xp\le x exceptional if some n∉{p,2p}n\notin\{p,2p\} has φ(n)=p−1\varphi(n)=p-1. Discard p=2p=2 at a cost of one, and for each remaining exceptional prime fix such an nn. Since φ(n)≥n/2\varphi(n)\ge\sqrt{n/2}, we have n≤2x2n\le2x^2, and input 1 gives n≤X:=3xlog⁡log⁡xn\le X:=3x\log\log x. Let q=P+(n)q=P^+(n).

A power of two. If q=2q=2, then n=2bn=2^b and p=2b−1+1p=2^{b-1}+1; there are at most log⁡2x+1\log_2x+1 such primes.

Otherwise qq is odd; let qaq^a be the exact power of qq dividing nn.

Case A: q≤yq\le y. Then nn is a yy-smooth integer up to XX, and nn determines p=φ(n)+1p=\varphi(n)+1. Here $u=\log X/\log y\ge1/(2\varepsilon) =6\log\log x$, so (2) gives at most

≪3xlog⁡log⁡x⋅(log⁡x)−3⋅log⁡x6log⁡log⁡x≪x(log⁡x)2\ll3x\log\log x\cdot(\log x)^{-3}\cdot\frac{\log x}{6\log\log x} \ll\frac x{(\log x)^2}

exceptional primes in this case.

Case B: q>yq>y and a≥2a\ge2. Each possible n≤Xn\le X is divisible by q2q^2 for some q>yq>y. Each nn determines p=φ(n)+1p=\varphi(n)+1, so their contribution is at most

∑q>y⌊Xq2⌋≤X∑j>y1j2≪xlog⁡log⁡xy≪x(log⁡x)10.\sum_{q>y}\left\lfloor\frac X{q^2}\right\rfloor \le X\sum_{j>y}\frac1{j^2} \ll\frac{x\log\log x}{y} \ll\frac x{(\log x)^{10}}.

Here yy exceeds every fixed power of log⁡x\log x for all sufficiently large xx.

Case C: q>yq>y and a=1a=1. Write n=qn′n=qn' with q∤n′q\nmid n'. If n′∈{1,2}n'\in\{1,2\}, then φ(n)=q−1=p−1\varphi(n)=q-1=p-1, so q=pq=p and n∈{p,2p}n\in\{p,2p\}, which is excluded. So n′≥3n'\ge3, and m=φ(n′)m=\varphi(n') is a totient value with m≥2m\ge2 and

p−1=(q−1)m,q−1≤x/m.p-1=(q-1)m,\qquad q-1\le x/m.

Every exceptional prime of this case is therefore m(q−1)+1m(q-1)+1 for some m∈Vm\in\mathcal V with 2≤m≤x2\le m\le x and some prime qq with y<q≤x/m+1y<q\le x/m+1 such that m(q−1)+1m(q-1)+1 is prime. Only mm with Y:=x/m+1≥yY:=x/m+1\ge y contribute. For those mm, log⁡Y≥log⁡x/(6log⁡log⁡x)\log Y\ge\log x/(6\log\log x), and Y≤2x/mY\le2x/m. Since mm and m−1m-1 are coprime,

∏ℓ∣m(m−1)(1−1ℓ)−1=mφ(m)⋅m−1φ(m−1)≪(log⁡log⁡x)2\prod_{\ell\mid m(m-1)}\Bigl(1-\frac1\ell\Bigr)^{-1} =\frac m{\varphi(m)}\cdot\frac{m-1}{\varphi(m-1)}\ll(\log\log x)^2

by input 1. Input 2 bounds the number of these qq by ≪x(log⁡log⁡x)4/(m(log⁡x)2)\ll x(\log\log x)^4/(m(\log x)^2), uniformly in mm. Summing over m∈Vm\in\mathcal V with (1),

#{exceptional p≤x in case C}≪δx(log⁡log⁡x)4(log⁡x)2−δ.\#\{\text{exceptional }p\le x\text{ in case C}\} \ll_\delta\frac{x(\log\log x)^4}{(\log x)^{2-\delta}}.

Conclusion of the reconstruction

Adding the cases, the number of exceptional primes up to xx is ≪δx(log⁡log⁡x)4/(log⁡x)2−δ\ll_\delta x(\log\log x)^4/(\log x)^{2-\delta} for every δ>0\delta>0, hence at most Cδx/(log⁡x)2−2δC_\delta x/(\log x)^{2-2\delta}; replacing δ\delta by δ/2\delta/2 and enlarging CδC_\delta to cover small xx gives the bound in the statement. As π(x)≫x/log⁡x\pi(x)\gg x/\log x, the exceptional primes have relative density zero.

Let pp be a prime that is not exceptional. The integers nn with T(n)=φ(n)+1=pT(n)=\varphi(n)+1=p are those with φ(n)=p−1\varphi(n)=p-1, namely pp and 2p2p. No nn has T(n)=2pT(n)=2p, because φ(n)\varphi(n) is even for n≥3n\ge3 and φ(1)=φ(2)=1\varphi(1)=\varphi(2)=1, while 2p−12p-1 is odd and greater than 11. If some iterate of nn equals pp, take the first one, Tk(n)=pT^k(n)=p. For k≥1k\ge1 the previous iterate is a TT-preimage of pp other than pp, so it is 2p2p, and then k=1k=1 because 2p2p has no preimage. Hence n∈{p,2p}n\in\{p,2p\}, and both elements reach pp.