OFFSET
1,2
COMMENTS
Number of images of the map (x,y,z) -> x^2+y^2+z^2 in Z_n.
MATHEMATICA
(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]])
CROSSREFS
KEYWORD
mult,nonn
AUTHOR
Steven Finch, Jan 30 2009
STATUS
approved