OFFSET
1,8
COMMENTS
a(n) is the number of values r, 0<=r<n, such that, for p=5 and for any m>=0, (m^p)%n != r.
LINKS
Stanislav Sykora, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n-A052274(n).
Satisfies a(n) <= n-3 (residues 0, 1, and n-1 are always present).
MATHEMATICA
Table[Length[Complement[Range[n - 1], Union[Mod[Range[n]^5, n]]]], {n, 100}] (* Vincenzo Librandi, Apr 20 2015 *)
PROG
(PARI) nrespowp(n, p) = {my(v=vector(n), d=0);
for(r=0, n-1, v[1+(r^p)%n]+=1);
for(k=1, n, if(v[k]==0, d++));
return(d); }
a(n) = nrespowp(n, 5)
CROSSREFS
KEYWORD
nonn
AUTHOR
Stanislav Sykora, Apr 19 2015
STATUS
approved