OFFSET
1,4
COMMENTS
a(n) is the number of values r, 0<=r<n, such that, for p=4 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 - A052273(n).
Satisfies a(n) <= n-2 (residues 0 and 1 are always present).
MATHEMATICA
Table[Length[Complement[Range[n - 1], Union[Mod[Range[n]^4, 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, 4)
CROSSREFS
KEYWORD
nonn
AUTHOR
Stanislav Sykora, Apr 19 2015
STATUS
approved