login
Number of Pythagorean quintuples mod n; i.e., number of solutions to v^2 + w^2 + x^2 + y^2 = z^2 mod n.
0

%I #12 Mar 06 2018 14:27:27

%S 1,16,81,192,625,1296,2401,3072,6723,10000,14641,15552,28561,38416,

%T 50625,47104,83521,107568,130321,120000,194481,234256,279841,248832,

%U 393125,456976,544563,460992,707281,810000,923521,753664

%N Number of Pythagorean quintuples mod n; i.e., number of solutions to v^2 + w^2 + x^2 + y^2 = z^2 mod n.

%H L. Toth, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Toth/toth12.html">Counting Solutions of Quadratic Congruences in Several Variables Revisited</a>, J. Int. Seq. 17 (2014) # 14.11.6.

%e x + 16 x^2 + 81 x^3 + 192 x^4 + 625 x^5 + 1296 x^6 + 2401 x^7 + ...

%t 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}]

%t 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 *)

%Y Cf. A062775 (number of solutions to x^2 + y^2 = z^2 mod n), A096018 (number of solutions to w^2 + x^2 + y^2 = z^2 mod n).

%K mult,nonn

%O 1,2

%A _T. D. Noe_, Jun 15 2004