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-8 of 8 results.

A267309 Number of discrete vectors with integral components and integral length <= n in a 3-dimensional vectorspace (Partial sums of A016725).

Original entry on oeis.org

6, 12, 42, 48, 78, 108, 162, 168, 270, 300, 378, 408, 486, 540, 690, 696, 798, 900, 1026, 1056, 1326, 1404, 1554, 1584, 1734, 1812, 2130, 2184, 2358, 2508, 2706, 2712, 3102, 3204, 3474, 3576, 3798, 3924, 4314, 4344, 4590, 4860, 5130, 5208, 5718
Offset: 1

Views

Author

Christopher Heiling, Jan 19 2016

Keywords

Comments

This sequence is Z_3(n), where Z_D(n) counts all vectors with integral components and length in a D-dimensional vectorpace within a certain radius. This sequence represents partial sums of A016725.

Examples

			For n = 2 the a(n)= 12 integral solutions of x^2 + y^2 + z^2 <= 2^2 are: {x,y,z} = {{0,0,1}; {0,1,0}; {1,0,0}; {0,0,-1}; {0,-1,0}; {-1,0,0}; {0,0,2}; {0,2,0}; {2,0,0}; {0,0,-2}; {0,-2,0}; {-2,0,0}}.
		

Crossrefs

Formula

a(n) = Sum_{k=1..n} A005875(k^2).
a(n) = Sum_{k=1..n} A016725(k).

A267651 Duplicate of A016725.

Original entry on oeis.org

6, 6, 30, 6, 30, 30, 54, 6, 102, 30, 78, 30, 78, 54, 150, 6, 102, 102, 126, 30, 270, 78, 150, 30, 150, 78, 318, 54, 174, 150, 198, 6, 390, 102, 270, 102, 222, 126, 390, 30, 246, 270, 270, 78, 510, 150, 294, 30, 390, 150, 510, 78, 318, 318, 390, 54, 630
Offset: 1

Views

Author

Keywords

A302996 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals: A(n,k) = [x^(n^2)] theta_3(x)^k, where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 4, 2, 0, 1, 6, 4, 2, 0, 1, 8, 6, 4, 2, 0, 1, 10, 24, 30, 4, 2, 0, 1, 12, 90, 104, 6, 12, 2, 0, 1, 14, 252, 250, 24, 30, 4, 2, 0, 1, 16, 574, 876, 730, 248, 30, 4, 2, 0, 1, 18, 1136, 3542, 4092, 1210, 312, 54, 4, 2, 0, 1, 20, 2034, 12112, 18494, 7812, 2250, 456, 6, 4, 2, 0
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 17 2018

Keywords

Comments

A(n,k) is the number of ordered ways of writing n^2 as a sum of k squares.

Examples

			Square array begins:
  1,  1,   1,   1,    1,     1,  ...
  0,  2,   4,   6,    8,    10,  ...
  0,  2,   4,   6,   24,    90,  ...
  0,  2,   4,  30,  104,   250,  ...
  0,  2,   4,   6,   24,   730,  ...
  0,  2,  12,  30,  248,  1210,  ...
		

Crossrefs

Columns k=0..4,7 give A000007, A040000, A046109, A016725, A267326, A361695.
Main diagonal gives A232173.

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, `if`(n<0 or t<1, 0,
          b(n, t-1)+2*add(b(n-j^2, t-1), j=1..isqrt(n))))
        end:
    A:= (n, k)-> b(n^2, k):
    seq(seq(A(n,d-n), n=0..d), d=0..12);  # Alois P. Heinz, Mar 10 2023
  • Mathematica
    Table[Function[k, SeriesCoefficient[EllipticTheta[3, 0, x]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
    Table[Function[k, SeriesCoefficient[Sum[x^i^2, {i, -n, n}]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten

Formula

A(n,k) = [x^(n^2)] (Sum_{j=-infinity..infinity} x^(j^2))^k.

A181786 Number of inequivalent solutions to n^2 = a^2 + b^2 + c^2 with positive a, b, c.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 1, 0, 3, 0, 2, 1, 1, 1, 3, 0, 2, 3, 3, 0, 6, 2, 3, 1, 2, 1, 8, 1, 3, 3, 4, 0, 10, 2, 5, 3, 4, 3, 8, 0, 5, 6, 6, 2, 11, 3, 6, 1, 8, 2, 12, 1, 6, 8, 8, 1, 15, 3, 8, 3, 7, 4, 20, 0, 6, 10, 9, 2, 16, 5, 9, 3, 9, 4, 15, 3, 15, 8, 10, 0, 22, 5, 11, 6, 9, 6, 18, 2, 11, 11, 14, 3, 21, 6, 13, 1, 12, 8, 31, 2
Offset: 0

Views

Author

T. D. Noe, Nov 12 2010

Keywords

Comments

Note that a(n)=0 for n=0 and the n in A094958.
Also note that a(2n)=a(n), e.g., a(1000)=a(500)=a(250)=a(125)=14. - Zak Seidov, Mar 02 2012
a(n) is the number of distinct parallelepipeds each one having integer diagonal n and integer sides. - César Eliud Lozada, Oct 26 2014

Crossrefs

Programs

  • Mathematica
    nn=100; t=Table[0,{nn}]; Do[n=Sqrt[a^2+b^2+c^2]; If[n<=nn && IntegerQ[n], t[[n]]++], {a,nn}, {b,a,nn}, {c,b,nn}]; Prepend[t,0]

A181787 Number of solutions to n^2 = a^2 + b^2 + c^2 with positive a, b, c.

Original entry on oeis.org

0, 0, 0, 3, 0, 0, 3, 6, 0, 12, 0, 9, 3, 6, 6, 15, 0, 9, 12, 15, 0, 33, 9, 18, 3, 12, 6, 39, 6, 18, 15, 24, 0, 48, 9, 30, 12, 24, 15, 45, 0, 27, 33, 33, 9, 60, 18, 36, 3, 48, 12, 60, 6, 36, 39, 45, 6, 78, 18, 45, 15, 42, 24, 114, 0, 36, 48, 51, 9, 93, 30, 54, 12, 51, 24, 87, 15, 87, 45, 60, 0, 120, 27, 63, 33, 51, 33, 105, 9, 63, 60, 84, 18, 123, 36, 75, 3, 69, 48, 165, 12
Offset: 0

Views

Author

T. D. Noe, Nov 12 2010

Keywords

Comments

Note that a(n)=0 for n=0 and the n in A094958.

Examples

			a(3)=3 because 3^2 = 1^2+2^2+2^2 = 2^2+1^2+2^2 = 2^2+2^2+1^2. - _Robert Israel_, Aug 02 2019
		

Crossrefs

Programs

  • Maple
    N:= 200: # for a(0)..a(N)
    A:= Array(0..N):
    mults:= [1,3,6]:
    for a from 1 while 3*a^2 <= N^2 do
      if a::odd then b0:= a+1; db:= 2 else b0:= a; db:= 1 fi;
      for b from b0 by db while a^2 + 2*b^2 <= N^2 do
        if (a+b)::odd then c0:= b + (b mod 2); dc:= 2 else c0:= b; dc:= 1 fi;
        for c from c0 by dc do
          v:= a^2 + b^2 + c^2;
          if v > N^2 then break fi;
          if issqr(v) then
            w:= sqrt(v);
            A[w]:= A[w]+ mults[nops({a,b,c})];
          fi
    od od od:
    convert(A,list); # Robert Israel, Aug 02 2019
  • Mathematica
    nn=100; t=Table[0,{nn}]; Do[n=Sqrt[a^2+b^2+c^2]; If[n<=nn && IntegerQ[n], t[[n]]++], {a,nn}, {b,nn}, {c,nn}]; Prepend[t,0]

Formula

a(n) = A063691(n^2). - Michel Marcus, Apr 25 2015
a(2*n) = a(n). - Robert Israel, Aug 02 2019

A181788 Number of solutions to n^2 = a^2 + b^2 + c^2 with nonnegative a, b, c.

Original entry on oeis.org

1, 3, 3, 6, 3, 9, 6, 9, 3, 15, 9, 12, 6, 15, 9, 24, 3, 18, 15, 18, 9, 36, 12, 21, 6, 27, 15, 42, 9, 27, 24, 27, 3, 51, 18, 39, 15, 33, 18, 54, 9, 36, 36, 36, 12, 69, 21, 39, 6, 51, 27, 69, 15, 45, 42, 54, 9, 81, 27, 48, 24, 51, 27, 117, 3, 63, 51, 54, 18, 96, 39, 57, 15, 60, 33, 102, 18, 90, 54, 63, 9, 123, 36, 66, 36, 78, 36, 114, 12, 72, 69, 93, 21, 126, 39, 84, 6, 78, 51, 168, 27
Offset: 0

Views

Author

T. D. Noe, Nov 12 2010

Keywords

Crossrefs

Programs

  • Mathematica
    nn=100; t=Table[0,{nn}]; Do[n=Sqrt[a^2+b^2+c^2]; If[n<=nn && IntegerQ[n], t[[n]]++], {a,0,nn}, {b,0,nn}, {c,0,nn}]; Prepend[t,1]
  • PARI
    {a(n)=local(G=sum(k=0,n,x^(k^2)+x*O(x^(n^2))));polcoeff(G^3,n^2)} /* Paul D. Hanna */
    
  • PARI
    A(n)=my(G=sum(k=0,n,x^(k^2),x*O(x^(n^2)))^3); vector(n+1, k, polcoeff(G,(k-1)^2)) \\ Charles R Greathouse IV, Apr 20 2012

Formula

G.f.: [x^(n^2)] G(x)^3 where G(x) = Sum_{k>=0} x^(k^2); the notation [x^(n^2)] G(x)^3 denotes the coefficient of x^(n^2) in G(x)^3. [From Paul D. Hanna, Apr 20 2012]

A386315 Number of points in a face-centered cubic lattice that intersect a sphere of radius n centered on a point in the lattice.

Original entry on oeis.org

1, 12, 12, 36, 12, 84, 36, 108, 12, 108, 84, 132, 36, 180, 108, 252, 12, 204, 108, 228, 84, 324, 132, 300, 36, 444, 180, 324, 108, 372, 252, 396, 12, 396, 204, 756, 108, 468, 228, 540, 84, 492, 324, 516, 132, 756, 300, 588, 36, 780, 444, 612, 180, 660, 324
Offset: 0

Views

Author

Charles L. Hohn, Aug 15 2025

Keywords

Comments

For all n > 0, the points at the 4 90-degree rotations of [n, 0, 0] and the eight 90-degree rotations and vertical reflections of [n/2, n/2, n*sqrt(1/2)] form the 12 vertices of a cuboctahedron (shown in red in the Links example). Points that otherwise lie on an axis plane have 24-point symmetry (green), and all other points have 48-point symmetry (blue). Thus, a(n) for all n > 0 are odd multiples of 12.
The number of noncongruent points for each sphere radius n (points within or on vertices or edges of each symmetry region in the Links example) gives A387222, the number of those points that are primitive for radius n (darker colors) gives A387223 for odd sphere radii, and the total primitive count divided by 12 gives A278081 for odd sphere radii. Examples of nonprimitive points include [3, 0, 0] and [3/2, 3/2, 3*sqrt(1/2)] for a(3), which reduce to a(1) primitive points [1, 0, 0] and [1/2, 1/2, sqrt(1/2)] respectively.
Analog for the simple cubic lattice is A016725.

Examples

			a(3) = 36, which is the sum of 4 90-degree rotations of [3, 0, 0], 8 90-degree rotations and vertical reflections of [3/2, 3/2, 3*sqrt(1/2)] and [1, 0, 4*sqrt(1/2)], and 16 90-degree rotations and vertical and horizontal reflections of [5/2, 3/2, sqrt(1/2)].
		

Crossrefs

Programs

  • PARI
    a(n)={my(c=0); for(x=0, n, for(y=0, min(x, sqrtint(n^2-x^2)), for(o=0, 1, my(m=2*(n^2-(x+o/2)^2-(y+o/2)^2)); if(!issquare(m), next); my(z=sqrtint(m)); if(z>=0 && z%2==o, c+=2^(4-if(!z, 1)-if(x==y, 1)-if(!min(x, y) && !o, 1)-if(!vecmax([x, y, z, o]), 1)))))); c}
    
  • PARI
    a(n)={if(!n, return(1)); my(f=Vec(factor(n)), o=12, r=o); for(i=if(#f[1] && f[1][1]==2, 2, 1), #f[1], my(m=if(f[1][i]%8>=4, 2)); f[2][i]++; while(f[2][i]--, o=o*f[1][i]+r*m); r=o); o}

Formula

a(n) = A004015(n^2).
a(2*n) = a(n).
a(p*n) = p*a(n) where p is a prime and p mod 8 is in {1, 3}.
a(p*n) = p*a(n) + 2*a(n/p^c) where p is a prime, p mod 8 is in {5, 7}, and c is the count of prime factors p in n.

A078183 Number of solutions to x^2 + y^2 + z^2 < n^2; number of lattice points inside a sphere of radius n.

Original entry on oeis.org

0, 1, 27, 93, 251, 485, 895, 1365, 2103, 2969, 4139, 5497, 7123, 9093, 11459, 13997, 17071, 20377, 24303, 28545, 33371, 38641, 44395, 50733, 57747, 65117, 73447, 82201, 91911, 101769, 112931, 124289, 137059, 150165, 164415, 179309, 195167
Offset: 0

Views

Author

T. D. Noe, Nov 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    s = 0; Table[s = s + Sum[SquaresR[3, k], {k, (n - 1)^2, n^2 - 1}], {n, 0, 50}]

Formula

a(n) = A000605(n) - A016725(n)
Showing 1-8 of 8 results.