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.

Showing 1-3 of 3 results.

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.

A237707 Number of unit cubes, aligned with a three-dimensional Cartesian mesh, completely within the first octant of a sphere centered at the origin, ordered by increasing radius.

Original entry on oeis.org

1, 4, 7, 10, 11, 17, 20, 23, 26, 32, 35, 38, 44, 48, 54, 60, 66, 69, 75, 78, 87, 96, 102, 105, 108, 114, 120, 121, 127, 133, 139, 145, 157, 163, 169, 178, 184, 196, 202, 214, 217, 220, 232, 238, 241, 244, 256, 263, 266, 278, 284, 296, 299, 308, 314, 329, 332
Offset: 1

Views

Author

Rajan Murthy, Feb 11 2014

Keywords

Examples

			When the radius of the sphere reaches 3^(1/2), one cube is completely within the sphere. When the radius reaches 6^(1/2), four cubes are completely within the sphere.
		

Crossrefs

The radii corresponding to the terms are given by the square roots of A000408 starting with squared radius 3.
Cf. A232499 (2-dimensional analog).
Partial sums of A014465 and A063691 (but then with repeated terms omitted).

Programs

  • Mathematica
    (* Illustrates the sequence *)
    Cube[x_,y_,z_]:=Cuboid[{x-1,y-1,z-1},{x,y,z}]
    Cubes[r_]:=Cube@@#&/@Select[Flatten[Table[{x,y,z},{x,1,r},{y,1,r},{z,1,r}],2],Norm[#]<=r&]
    Draw[r_]:=Graphics3D[Union[Cubes[r],{{Green, Opacity[0.3], Sphere[{0,0,0},r]}}],PlotRange->{{0,r},{0,r},{0,r}},ViewPoint->{r,3r/4,3r/5}];
    Draw/@Sqrt/@{3,6,9,11,12,14} (* Charles R Greathouse IV, Mar 12 2014 *)
  • Scilab
    // See Murthy link.

Formula

a(n) ~ (Pi*sqrt(30)/25)*n^(3/2). - Charles R Greathouse IV, Mar 14 2014

Extensions

Duplicate terms deleted by Rajan Murthy, Mar 06 2014
Terms a(36) and beyond added from b-file by Andrew Howroyd, Feb 27 2018

A229904 Number of additional unit squares completely encircled in the first quadrant of a Cartesian grid by a circle centered at the origin as the radius squared increases from one sum of two square integers to the next larger sum of two square integers.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 4, 2, 1, 2, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 4, 2, 2, 2, 2
Offset: 1

Views

Author

Rajan Murthy and Vale Murthy, Dec 19 2013

Keywords

Comments

From Mohammed Yaseen, Apr 23 2025: (Start)
a(n) is the number of solutions to x^2 + y^2 = A000404(n), x,y,z >= 1.
a(n) are the degeneracies of the energy levels of a particle in a two-dimensional box in quantum mechanics. See A014465 for the three-dimensional box case. (End)

Examples

			When the radius increases from 0 to sqrt(2), one square is completely encircled (a(1)).  When the radius increases from sqrt(2) to sqrt(3), two more squares are encircled (a(2)).  When the radius increases from sqrt(45) to sqrt(50), three more squares are encircled(a(18)).
		

Crossrefs

First differences of A232499.
Radii are the square roots of A000404.
The first differences must be odd at positions given in A024517 by proof by symmetry as r^2=2*n^2 is on the x=y line.

Formula

a(n) = A232499(n) - A232499(n-1) for n>1, a(1) = A232499(1).
Showing 1-3 of 3 results.