|
|
A196777
|
|
Sum (mod n) of the distinct residues of x^n (mod n), x=0..n-1.
|
|
1
|
|
|
0, 1, 0, 1, 0, 2, 0, 1, 0, 5, 0, 2, 0, 0, 0, 1, 0, 2, 0, 2, 0, 0, 0, 2, 0, 13, 0, 0, 0, 0, 0, 1, 0, 17, 0, 2, 0, 0, 0, 2, 0, 4, 0, 22, 0, 0, 0, 2, 0, 25, 0, 0, 0, 2, 0, 28, 0, 29, 0, 4, 0, 0, 0, 1, 0, 0, 0, 17, 0, 0, 0, 2, 0, 37, 0, 38, 0, 0, 0, 2, 0, 41, 0, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
if n = 2^m, a(n) = 1 ;
if n is odd, a(n) = 0 ;
if a(n) is prime > 2, then a(n) = n/2, for example a(10) = a(2*5) = 5 ;
There exists composite numbers k such that a(k)=k/2, for example a(44)= a(2*22)=22.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(10) = 5 because the residues (mod 10) of x^10 are 0, 1, 4, 5, 6, 9 and the sum 25 ==5 (mod 10).
|
|
MAPLE
|
with(numtheory):sumDistRes := proc(n) local re, x, r ; re := {} ; for x from 0 to n-1 do re := re union { modp(x^n, n) } ; end do: add(r, r=re) ; end : for n from 1 to 150 do ; z:=irem(sumDistRes(n), n) ; printf("%d, ", z); end do: #
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|