login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Largest solution x to phi(x) + 1 = prime(n).
12

%I #23 Dec 16 2024 01:55:00

%S 2,6,12,18,22,42,60,54,46,58,62,126,150,98,94,106,118,198,134,142,270,

%T 158,166,276,420,250,206,214,378,348,254,262,274,278,298,302,474,486,

%U 334,346,358,594,382,840,394,398,422,446,454,458,708,478,1050,502,1020

%N Largest solution x to phi(x) + 1 = prime(n).

%H Amiram Eldar, <a href="/A066080/b066080.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)

%H Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp).

%H David M. Bressoud, <a href="https://www.davidbressoud.org/books-videos">A Course in Computational Number Theory (webpage)</a>, <a href="https://drive.google.com/file/d/1UMesJ93mpdCabQvETMqOBH8eCR4JWA6X/view?usp=sharing">CNT.m</a>, Computational Number Theory Mathematica package.

%e For p = 97: x = {97, 119, 153, 194, 195, 208, 224, 238, 260, 280, 288, 306, 312, 336, 360, 390, 420} is the set of 17 solutions such that phi(x) + 1 = 97.

%t Table[Do[s=1+EulerPhi[n]; If[Equal[s, Prime[k]], Print[{n, s}]], {n, 1, 4*Prime[k]^2}], {k, 1, 100}]

%t Needs["CNT`"]; Table[Solve[EulerPhi[x] == Prime[n] - 1, x][[-1, -1, -1]], {n, 100}] (* _T. D. Noe_, Nov 07 2011 *)

%o (PARI) a(n) = invphiMax(prime(n)-1); \\ _Amiram Eldar_, Dec 16 2024, using _Max Alekseyev_'s invphi.gp

%Y Cf. A000010, A057826 (greatest number with totient 2n).

%K nonn

%O 1,1

%A _Labos Elemer_, Dec 03 2001