OFFSET
1,2
LINKS
L. Toth, Counting Solutions of Quadratic Congruences in Several Variables Revisited, J. Int. Seq. 17 (2014) # 14.11.6.
EXAMPLE
x + 16 x^2 + 81 x^3 + 192 x^4 + 625 x^5 + 1296 x^6 + 2401 x^7 + ...
MATHEMATICA
Table[cnt=0; Do[If[Mod[v^2+w^2+x^2+y^2-z^2, n]==0, cnt++ ], {v, 0, n-1}, {w, 0, n-1}, {x, 0, n-1}, {y, 0, n-1}, {z, 0, n-1}]; cnt, {n, 30}]
a[ n_] := If[ n < 1, 0, Sum[ 1 - Sign[ Mod[ v^2 + w^2 + x^2 + y^2 - z^2, n]], {v, n}, {w, n}, {x, n}, {y, n}, {z, n}]]; (* Michael Somos, Jan 21 2012 *)
CROSSREFS
KEYWORD
mult,nonn
AUTHOR
T. D. Noe, Jun 15 2004
STATUS
approved