OFFSET
1,2
COMMENTS
For all primes p we have p^p == 1 (mod phi(p)), because p = phi(p) + 1.
All terms are squarefree.
If k is a composite number such that phi(k) divides k-1 then k is in the sequence. What is the first such number? - Jahangeer Kholdi, Dec 10 2014
All terms are odd. - Robert Israel, Dec 12 2014
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..51
EXAMPLE
205505 is a nonprime number, phi(205505) = 157168 and 205505^205505 == 1 (mod 157168) so 205505 is in the sequence.
MATHEMATICA
v={1}; Do[If[ !PrimeQ[n]&&PowerMod[n, n, EulerPhi[n]]==1, AppendTo[v, n];
Print[v]], {n, 200000000}]
PROG
(PARI) is(n)=Mod(n, eulerphi(n))^n==1 && !isprime(n) \\ Charles R Greathouse IV, Dec 11 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Farideh Firoozbakht, May 19 2010
EXTENSIONS
a(7)-a(8) from Jahangeer Kholdi, Dec 10 2014
a(9)-a(13) from Jahangeer Kholdi, Dec 11 2014
a(14)-a(24) from Giovanni Resta, Apr 28 2017
STATUS
approved