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 A097203 #23 Apr 07 2013 11:26:29 %S A097203 0,0,0,1,0,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1,1,1,1,0,1,1,1,2,0,1,2,0,1,2, %T A097203 1,1,2,1,2,0,0,3,2,1,2,1,2,0,2,2,1,3,1,2,3,0,2,4,1,2,2,1,3,0,1,3,3,2, %U A097203 2,4,2,0,3,2,3,3,2,3,3,0,2,5,2,3,3,2,4,0,1,5,4,2,4,2,3,0,4,4,3 %N A097203 Number of 4-tuples (a,b,c,d) with 1 <= a <= b <= c <= d, a^2+b^2+c^2+d^2 = n and gcd(a,b,c,d) = 1. %C A097203 The old entry with this sequence number was a duplicate of A034836. %C A097203 From _Wolfdieter Lang_, Mar 25 2013: (Start) %C A097203 a(n) = 0 if n has no partition with four parts, each a (nonzero) square, and the parts have no common factor > 1. %C A097203 n is not representable as a primitive sum of four nonzero squares. %C A097203 If n' has a representation [s(1),s(2),s(3),s(4)] with 1 <= s(1) <= s(2) <= s(3) <= s(4) and sum(s(j)^2,j=1..4) = n', then [k*s(1),k*s(2),k*s(3),k*s(4)] is a representation of n := k^2*n'. Therefore, only primitive representations with gcd(s(1),s(2),s(3),s(4)) = 1 are here considered. %C A097203 See A025428(n) for the multiplicity of the representations of n as a sum of four nonzero squares. %C A097203 For the n values with a(n) not zero (primitively representable as a sum of four nonzero squares) see A222949. (End) %H A097203 N. J. A. Sloane, Vinay Vaishampayan and Alois P. Heinz, <a href="/A097203/b097203.txt">Table of n, a(n) for n = 1..10000</a> (terms n = 1..1024 from N. J. A. Sloane and Vinay Vaishampayan) %F A097203 If a(n) > 0 then 8 does not divide n. %F A097203 a(n) = k if there are k different quadruples [s(1),s(2),s(3),s(4)] with 1 <= s(1) <= s(2) <= s(3) <= s(4), gcd(s(1),s(2),s(3),s(4)) = 1 and sum(s(j)^2,j=1..4) = n. If there is no such quadruple then a(n) = 0. - _Wolfdieter Lang_, Mar 25 2013 %e A097203 The solutions (if any) for n <= 20 are as follows: %e A097203 n = 1: %e A097203 n = 2: %e A097203 n = 3: %e A097203 n = 4: 1 1 1 1 %e A097203 n = 5: %e A097203 n = 6: %e A097203 n = 7: 1 1 1 2 %e A097203 n = 8: %e A097203 n = 9: %e A097203 n = 10: 1 1 2 2 %e A097203 n = 11: %e A097203 n = 12: 1 1 1 3 %e A097203 n = 13: 1 2 2 2 %e A097203 n = 14: %e A097203 n = 15: 1 1 2 3 %e A097203 n = 16: %e A097203 n = 17: %e A097203 n = 18: 1 2 2 3 %e A097203 n = 19: 1 1 1 4 %e A097203 n = 20: 1 1 3 3 %e A097203 From _Wolfdieter Lang_, Mar 25 2013: (Start) %e A097203 a(16) = 0 because 16 is not a primitive sum of four nonzero squares. The representation [2,2,2,2] of 16 is not primitive. %e A097203 a(40) = 0 because the only representation as sum of four nonzero squares (A025428(4) = 1) is [2,2,4,4], but this is not primitive. %e A097203 a(28) = 2 because the two primitive representations of 28 are %e A097203 [1, 1, 1, 5] and [1, 3, 3, 3]. [2, 2, 2, 4] = 2*[1, 1, 1, 2] is not primitive due to 28 = 2^2*7. (End) %p A097203 b:= proc(n, i, g, t) option remember; `if`(n=0, %p A097203 `if`(g=1 and t=0, 1, 0), `if`(i<1 or t=0 or i^2*t<n, 0, %p A097203 b(n, i-1, g, t)+ `if`(i^2>n, 0, b(n-i^2, i, igcd(g, i), t-1)))) %p A097203 end: %p A097203 a:= n-> `if`(n<4, 0, b(n, isqrt(n-3), 0, 4)): %p A097203 seq(a(n), n=1..120); # _Alois P. Heinz_, Apr 02 2013 %t A097203 Clear[b]; b[n_, i_, g_, t_] := b[n, i, g, t] = If[n == 0, If[g == 1 && t == 0, 1, 0], If[i < 1 || t == 0 || i^2*t < n, 0, b[n, i-1, g, t] + If[i^2 > n, 0, b[n-i^2, i, GCD[g, i], t-1]]]]; a[n_] := If[n < 4, 0, b[n, Sqrt[n-3] // Floor, 0, 4]]; Table[a[n], {n, 1, 99}] (* _Jean-François Alcover_, Apr 05 2013, translated from _Alois P. Heinz_'s Maple program *) %Y A097203 Cf. A025428, A000414, A222949. %K A097203 nonn %O A097203 1,28 %A A097203 _N. J. A. Sloane_ and _Vinay Vaishampayan_, Oct 22 2008