This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A229294 #22 Aug 07 2018 17:42:03 %S A229294 8,96,264,384,1160,3168,3080,1536,7560,13920,11528,12672,18824,36960, %T A229294 38280,6144,41480,90720,57608,55680,101640,138336,101384,50688,149000, %U A229294 225888,208008,147840,201608,459360,245768,24576,380424,497760,446600,362880,415880 %N A229294 Number of solutions to x^2 + y^2 + z^2 + t^2 == n (mod 2*n) for x,y,z,t in [0, 2*n). %C A229294 All values are divisible by a(1)=8 and the sequence a(n)/8 is multiplicative. - _Andrew Howroyd_, Aug 07 2018 %H A229294 Chai Wah Wu, <a href="/A229294/b229294.txt">Table of n, a(n) for n = 1..10000</a> %F A229294 a(n) = 8*A240547(n) for odd n, a(2^k) = 24*2^(2*k). - _Andrew Howroyd_, Aug 07 2018 %t A229294 A[n_] := Sum[If[Mod[a^2 + b^2 + c^2 + d^2, 2n] == n, 1, 0], {d, 0, 2n - 1}, {a, 0, 2n - 1}, {b, 0, 2n - 1}, {c, 0, 2n - 1}];Table[Print[aaa = A[n]]; aaa, {n, 1, 40}] %o A229294 (PARI) a(n)={my(m=2*n); my(p=Mod(sum(i=0, m-1, x^(i^2%m)), x^m-1)^4); polcoeff( lift(p), n)} \\ _Andrew Howroyd_, Aug 07 2018 %o A229294 (PARI) a(n)={my(f=factor(n)); 8*prod(i=1, #f~, my([p,e]=f[i,]); if(p==2, 3*2^(2*e), p^(2*e-1)*(p^(e+1)+p^e-1)))} \\ _Andrew Howroyd_, Aug 07 2018 %o A229294 (Python) %o A229294 def A229294(n): %o A229294 ndict = {} %o A229294 n2 = 2*n %o A229294 for i in range(n2): %o A229294 i3 = pow(i,2,n2) %o A229294 for j in range(i+1): %o A229294 j3 = pow(j,2,n2) %o A229294 m = (i3+j3) % n2 %o A229294 if m in ndict: %o A229294 if i == j: %o A229294 ndict[m] += 1 %o A229294 else: %o A229294 ndict[m] += 2 %o A229294 else: %o A229294 if i == j: %o A229294 ndict[m] = 1 %o A229294 else: %o A229294 ndict[m] = 2 %o A229294 count = 0 %o A229294 for i in ndict: %o A229294 j = (n-i) % n2 %o A229294 if j in ndict: %o A229294 count += ndict[i]*ndict[j] %o A229294 return count # _Chai Wah Wu_, Jun 07 2017 %Y A229294 Cf. A229295, A229296, A229297, A240547. %K A229294 nonn %O A229294 1,1 %A A229294 _José María Grau Ribas_, Sep 22 2013