

A196546


Numbers n such that the sum of the distinct residues of x^n (mod n), x=0..n1, is divisible by n.


4



1, 3, 5, 7, 9, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 27, 28, 29, 30, 31, 33, 35, 37, 38, 39, 41, 43, 45, 46, 47, 49, 51, 52, 53, 55, 57, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 75, 77, 78, 79, 81, 83, 85, 86, 87, 89, 91, 92, 93, 94, 95, 97, 98, 99, 101
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

All odd prime numbers are in the sequence.
The sum of the distinct residues is 0, 1, 3, 1, 10, 8, 21, 1, 9, 25, 55, 14, 78, 42, 105, 1, 136,.. for n>=1.


LINKS

Table of n, a(n) for n=1..66.


EXAMPLE

n= 14 is in the sequence because x^14 == 0, 1, 2, 4, 7, 8, 9, or 11 (mod 14), and the sum 0+1+2+4+7+8+9+11 = 42 is divisible by 14.


MAPLE

sumDistRes := proc(n)
local re, x, r ;
re := {} ;
for x from 0 to n1 do
re := re union { modp(x^n, n) } ;
end do:
add(r, r=re) ;
end proc:
for n from 1 to 100 do
if sumDistRes(n) mod n = 0 then
printf("%d, ", n);
end if;
end do: # R. J. Mathar, Oct 04 2011


CROSSREFS

Cf. A195637.
Sequence in context: A081534 A214547 A097218 * A231773 A007617 A065878
Adjacent sequences: A196543 A196544 A196545 * A196547 A196548 A196549


KEYWORD

nonn


AUTHOR

Michel Lagneau, Oct 03 2011


STATUS

approved



