%I #3 Oct 10 2012 04:12:26
%S 1,2,3,4,5,6,7,7,9,10,11,12,13,14,15,14,17,18,19,20,21,22,23,21,25,26,
%T 27,28,29,30,31,27,33,34,35,36,37,38,39,35,41,42,43,44,45,46,47,42,49,
%U 50,51,52,53,54,55,49,57,58,59,60,61,62,63,54,65,66,67,68,69,70,71,63
%N Number of squared hypotenuses mod n in three dimensions.
%C Number of images of the map (x,y,z) -> x^2+y^2+z^2 in Z_n.
%t (For[v = Table[0, {m, 1, n^3}]; m = 1; i = 0, i < n, i++, For[j = 0, j < n, j++, For[k = 0, k < n, k++, v[[m]] = Mod[i^2 + j^2 + k^2, n]; m = m + 1]]]; Length[Union[v]])
%K mult,nonn
%O 1,2
%A _Steven Finch_, Jan 30 2009