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”).

A066900
a(n) = max( {k : phi(k)==n (mod(k)) } ).
2
2, 6, 2, 12, 3, 18, 2, 30, 5, 22, 3, 42, 7, 10, 9, 60, 3, 54, 5, 66, 11, 46, 15, 90, 13, 6, 7, 58, 5, 62, 2, 120, 21, 14, 3, 126, 19, 30, 5, 150, 7, 98, 11, 138, 27, 94, 3, 210, 5, 34, 13, 106, 33, 162, 7, 174, 29, 118, 35, 198, 31, 14, 39, 240, 11, 134, 17, 46, 45, 142
OFFSET
1,1
PROG
(PARI) a(n) = {my(v = invphi(n), m = if (#v, vecmax(v), n)); vecmax(select(x->(Mod(eulerphi(x), x) == n), [1..m])); } \\ Michel Marcus, Feb 22 2021; needs invphi
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 24 2002
EXTENSIONS
More terms from Michel Marcus, Feb 22 2021
STATUS
approved