login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A066659
Least k > n such that phi(k) = phi(n), if such k exists; = 0 otherwise.
7
2, 0, 4, 6, 8, 0, 9, 10, 14, 12, 22, 0, 21, 18, 16, 20, 32, 0, 27, 24, 26, 0, 46, 30, 33, 28, 38, 36, 58, 0, 62, 34, 44, 40, 39, 42, 57, 54, 45, 48, 55, 0, 49, 50, 52, 0, 94, 60, 86, 66, 64, 56, 106, 0, 75, 70, 63, 0, 118, 0, 77, 0, 74, 68, 104, 0, 134, 80, 92, 72, 142, 78, 91
OFFSET
1,1
MATHEMATICA
Table[k = n + 1; While[And[k <= 2 n + 1, EulerPhi@ k != EulerPhi@ n], k++]; Boole[k < 2 n + 1] k, {n, 73}] (* Michael De Vlieger, Dec 31 2016 *)
PROG
(PARI) a(n) = {my(v = select(x -> x>n, invphi(eulerphi(n)))); if(#v == 0, 0, vecmin(v)); } \\ Amiram Eldar, Nov 14 2024, using Max Alekseyev's invphi.gp
CROSSREFS
Sequence in context: A322402 A196877 A098123 * A343468 A287846 A378131
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 10 2002
EXTENSIONS
More terms from Vladeta Jovovic, Jan 12 2002
Typo in data fixed by Paul Tek, Sep 20 2015
STATUS
approved