OFFSET
1,2
COMMENTS
LINKS
Francois R. Grieu, Table of n, a(n) for n = 1..10000
EXAMPLE
k=3 (resp. 5, 7) is not in the sequence because for prime p=2 it holds p^k mod k = 2 which is p.
k=9 is in the sequence because for prime p=2 (resp. 3, 5, 7) it holds p^k mod k = 8 (resp. 0, 8, 1) which is not p, and for all other primes p it holds p>=k therefore p^k mod k can't be p.
MATHEMATICA
Cases[Range[1, 930, 2], k_/; (For[p=2, p<k && PowerMod[p, k, k]!=p, p=NextPrime[p]]; p>=k)]
CROSSREFS
KEYWORD
nonn
AUTHOR
Francois R. Grieu, Jul 26 2024
STATUS
approved