OFFSET
1,2
LINKS
David W. Wilson, Table of n, a(n) for n = 1..10099
MATHEMATICA
res[mod_] := Length[Union[Table[PowerMod[i, i, mod], {i, 1, mod + LCM[mod*CarmichaelLambda[mod]]}]]]; Table[res[n], {n, 100}]
PROG
(PARI) period(n) = lcm(n, znstar(n)[2]); \\ A174824
a(n) = {v = []; for (i=1, period(n), v = Set(concat(v, Mod(i, n)^i)); ); #v; } \\ Michel Marcus, Mar 18 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Jan 23 2012
STATUS
approved