%I #6 Mar 30 2012 18:35:59
%S 1,2,4,8,9,10,16,26,32,34,58,64,74,81,82,84,106,122,128,146,178,194,
%T 196,202,218,226,250,256,274,298,314,346,361,362,386,394,441,458,466,
%U 480,482,512,514,538,554,562,586,626,634,674,676,698,706,722,729,746
%N Numbers m such that the sum of the distinct residues of x^m (mod m) is a perfect square, x=0..m-1.
%C m such that A195812(m) is a perfect square.
%e a(8) = 26 because x^26 == > 0, 1, 3, 4, 9, 10, 12, 13, 14, 16, 17, 22, 23, 25 (mod 26), and the sum = 169 = 13^2.
%p sumSquares := proc(n)
%p local re, x, r ;
%p re := {} ;
%p for x from 0 to n-1 do
%p re := re union { modp(x^n, n) } ;
%p end do:
%p add(r, r=re) ;
%p end proc:
%p for n from 1 to 750 do
%p z:= sqrt(sumSquares(n));
%p if z=floor(z) then
%p printf("%d, ", n);
%p end if;
%p end do: #
%Y Cf. A195812, A196547, A196546, A195637.
%K nonn
%O 1,2
%A _Michel Lagneau_, Oct 05 2011