cp's OEIS Frontend

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.

A063691 Number of solutions to x^2 + y^2 + z^2 = n in positive integers.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 3, 0, 0, 3, 0, 3, 1, 0, 6, 0, 0, 3, 3, 3, 0, 6, 3, 0, 3, 0, 6, 4, 0, 6, 6, 0, 0, 6, 3, 6, 3, 0, 9, 0, 0, 9, 6, 3, 3, 6, 6, 0, 1, 6, 6, 6, 0, 6, 12, 0, 6, 6, 0, 9, 0, 6, 12, 0, 0, 6, 12, 3, 3, 12, 6, 0, 3, 3, 12, 7, 3, 12, 6, 0, 0, 12, 3, 9, 6, 0, 15, 0, 3, 15
Offset: 0

Views

Author

Andrew A. Doroshev (andy(AT)ip.rsu.ru), Aug 23 2001

Keywords

Examples

			a(5)=0;
a(6)=3 because 1^2+1^2+2^2 = 1^2+2^2+1^2 = 2^2+1^2+1^2 = 6;
a(27)=4 because 1^2+1^2+5^2 = 1^2+5^2+1^2 = 3^2+3^2+3^2 = 5^2+1^2+1^2 = 27.
		

Crossrefs

Sequence without zeros: A014465.
Cf. A063725, A063730, A211639 (partial sums).
Column k=3 of A337165.

Programs

  • Mathematica
    r[n_] := Reduce[ x>0 && y>0 && z>0 && x^2 + y^2 + z^2 == n, {x, y, z}, Integers]; a[n_] := Which[rn = r[n]; rn === False, 0, Head[rn] === Or, Length[rn], True, 1]; Table[a[n], {n, 0, 89}](* Jean-François Alcover, May 10 2012 *)
    (EllipticTheta[3, 0, x] - 1)^3/8 + O[x]^100 // CoefficientList[#, x]& (* Jean-François Alcover, Jul 30 2017 *)

Formula

G.f.: (Sum_{m>=1} x^(m^2))^3.