OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
6th prime is 13 and 13 first divides 6^6 + 1 = 46657, so a(6) = 6.
MATHEMATICA
smp[n_]:=Module[{m=1}, While[PowerMod[m, m, n]!=n-1, m++]; m]; smp/@Prime[ Range[ 70]] (* Harvey P. Dale, Jul 21 2018 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Nov 13 2002
STATUS
approved