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

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

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 13, 7, 1, 1, 9, 33, 29, 9, 1, 1, 11, 89, 123, 49, 11, 1, 1, 13, 221, 425, 257, 81, 13, 1, 1, 15, 485, 1343, 1281, 515, 113, 15, 1, 1, 17, 953, 4197, 5913, 3121, 925, 149, 17, 1, 1, 19, 1713, 12435, 23793, 16875, 6577, 1419, 197, 19, 1, 1, 21, 2869, 33809, 88273, 84769, 42205, 11833, 2109, 253, 21, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 17 2018

Keywords

Comments

A(n,k) is the number of integer lattice points inside the k-dimensional hypersphere of radius n.

Examples

			Square array begins:
  1,   1,   1,    1,     1,      1,  ...
  1,   3,   5,    7,     9,     11,  ...
  1,   5,  13,   33,    89,    221,  ...
  1,   7,  29,  123,   425,   1343,  ...
  1,   9,  49,  257,  1281,   5913,  ...
  1,  11,  81,  515,  3121,  16875,  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Function[k, SeriesCoefficient[EllipticTheta[3, 0, x]^k/(1 - x), {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
    Table[Function[k, SeriesCoefficient[1/(1 - x) Sum[x^i^2, {i, -n, n}]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
  • PARI
    T(n,k)={if(k==0, 1, polcoef(((1 + 2*sum(j=1, n, x^(j^2)) + O(x*x^(n^2)))^k)/(1-x), n^2))} \\ Andrew Howroyd, Sep 14 2019

Formula

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

A046895 Sizes of successive clusters in Z^4 lattice.

Original entry on oeis.org

1, 9, 33, 65, 89, 137, 233, 297, 321, 425, 569, 665, 761, 873, 1065, 1257, 1281, 1425, 1737, 1897, 2041, 2297, 2585, 2777, 2873, 3121, 3457, 3777, 3969, 4209, 4785, 5041, 5065, 5449, 5881, 6265, 6577, 6881, 7361, 7809, 7953, 8289, 9057
Offset: 0

Views

Author

Keywords

Comments

Number of lattice points inside or on the 4-sphere x^2 + y^2 + z^2 + u^2 = n. - T. D. Noe, Mar 14 2009

Crossrefs

Partial sums of A000118.

Programs

  • Mathematica
    Accumulate[ Table[ SquaresR[4, n], {n, 0, 42}]] (* Jean-François Alcover, May 11 2012 *)
    QP = QPochhammer; s = (QP[q^2]^5/(QP[q]^2*QP[q^4]^2))^4/(1-q) + O[q]^50; CoefficientList[s, q] (* Jean-François Alcover, Nov 25 2015, after Joerg Arndt *)
  • PARI
    q='q+O('q^66);
    Vec((eta(q^2)^5/(eta(q)^2*eta(q^4)^2))^4/(1-q))
    /* Joerg Arndt, Apr 08 2013 */
    
  • Python
    from math import isqrt
    def A046895(n): return 1+((-(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))&-1)<<2)+(((t:=isqrt(m:=n>>2))**2*(t+1)-sum((q:=m//k)*((k<<1)+q+1) for k in range(1,t+1))&-1)<<4) # Chai Wah Wu, Jun 21 2024

Formula

a(n) = A122510(4,n). a(n^2) = A055410(n). - R. J. Mathar, Apr 21 2010
G.f.: T3(q)^4/(1-q) where T3(q) = 1 + 2*Sum_{k>=1} q^(k^2). - Joerg Arndt, Apr 08 2013
Pi^2/2 * (sqrt(n)-1)^4 < a(n) < Pi^2/2 * (sqrt(n)+1)^4 for n > 0. - Charles R Greathouse IV, Feb 17 2015
a(n) = Pi^2/2 * n^2 + O(n (log n)^(2/3)) using a result of Walfisz. - Charles R Greathouse IV, Feb 18 2015
a(n) = 1 + 8*A024916(n) - 32*A024916(floor(n/4)) by Jacobi's four-square theorem. - Peter J. Taylor, Jun 03 2020

A341423 Number of positive solutions to (x_1)^2 + (x_2)^2 + (x_3)^2 + (x_4)^2 <= n^2.

Original entry on oeis.org

1, 5, 32, 94, 219, 437, 804, 1362, 2177, 3271, 4768, 6708, 9227, 12381, 16254, 20954, 26707, 33461, 41480, 50884, 61703, 74183, 88606, 104862, 123481, 144241, 167604, 193648, 222799, 254731, 290244, 329512, 372545, 419661, 470822, 526646, 587481, 653505
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 4):
    seq(a(n), n=2..39);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^4/(16 (1 - x)), {x, 0, n^2}], {n, 2, 39}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^4 / (16 * (1 - x)).

A302861 a(n) = [x^(n^2)] theta_3(x)^n/(1 - x), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 3, 13, 123, 1281, 16875, 252673, 4031123, 70554353, 1318315075, 26107328109, 549772933959, 12147113355505, 280978137279483, 6780378828922333, 169829490474843659, 4409771551548703649, 118361723203178140163, 3277041835527134201777, 93455465161026267454527
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 14 2018

Keywords

Comments

a(n) = number of integer lattice points inside the n-dimensional hypersphere of radius n.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[EllipticTheta[3, 0, x]^n/(1 - x), {x, 0, n^2}], {n, 0, 19}]
    Table[SeriesCoefficient[1/(1 - x) Sum[x^k^2, {k, -n, n}]^n, {x, 0, n^2}], {n, 0, 19}]

Formula

a(n) = A122510(n,n^2).

A349611 Number of solutions to x^2 + y^2 + z^2 + w^2 <= n^2, where x, y, z, w are positive odd integers.

Original entry on oeis.org

0, 0, 1, 1, 5, 11, 32, 44, 82, 120, 207, 277, 405, 541, 768, 966, 1272, 1592, 2087, 2489, 3103, 3719, 4588, 5348, 6386, 7522, 8891, 10175, 11909, 13623, 15818, 17742, 20278, 22720, 25923, 28917, 32361, 36031, 40368, 44488, 49400, 54358, 60377, 65835, 72341
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 23 2021

Keywords

Examples

			a(4) = 5 since there are solutions (1,1,1,1), (3,1,1,1), (1,3,1,1), (1,1,3,1), (1,1,1,3).
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(0) .. a(N)
    F:= add(x^(k^2),k = 1 ... N,2):
    F:= expand(F^4):
    L:= ListTools:-PartialSums([seq](coeff(F,x,n),n=0..N^2)):
    L[[seq(n^2+1,n=0..N)]]; # Robert Israel, Dec 21 2023
  • Mathematica
    Table[SeriesCoefficient[EllipticTheta[2, 0, x^4]^4/(16 (1 - x)), {x, 0, n^2}], {n, 0, 44}]

Formula

a(n) = [x^(n^2)] theta_2(x^4)^4 / (16 * (1 - x)).

A175370 a(n) = A175369(n^2).

Original entry on oeis.org

1, 9, 81, 137, 321, 609, 1081, 1561, 2137, 3193, 4393, 4889, 6617, 8425, 9529, 11905, 14169, 17097, 18953, 21953, 25105, 29177, 32681, 35937, 41105, 46321, 50529, 55217, 62177, 67665, 74849, 80817, 87185, 96449, 104945, 112609, 120881, 130137
Offset: 0

Views

Author

R. J. Mathar, Apr 24 2010

Keywords

Comments

Number of integer 4-tuples (x,y,z,u) satisfying |x|^3+|y|^3+|z|^3+|u|^3 <= n^2, -n <= x,y,z <= n. If the cubes were replaced by squares, A055410 would result.

A175377 a(n) = A175376(n^2).

Original entry on oeis.org

1, 7, 27, 27, 33, 81, 117, 125, 125, 131, 251, 275, 275, 311, 335, 335, 349, 493, 493, 613, 613, 637, 637, 697, 697, 727, 871, 991, 999, 1023, 1143, 1143, 1191, 1191, 1215, 1215, 1281, 1449, 1569, 1617, 1737, 1785, 1785, 1809, 1889, 1985, 1985, 2033, 2033
Offset: 0

Views

Author

R. J. Mathar, Apr 24 2010

Keywords

Comments

Number of integer triples (x,y,z) satisfying x^4+y^4+z^4 <= n^2, -n <= x,y,z <= n.

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    A:= Array(0..N):
    for i from 0 while i^4 <= N^2 do
      if i=0 then ai:= 1 else ai:= 2 fi;
      for j from 0 while i^4 + j^4 <= N^2 do
        if j=0 then aj:= 1 else aj:= 2 fi;
        for k from 0 do
          v:= ceil((i^4 + j^4 + k^4)^(1/2));
          if v > N then break fi;
          if k = 0 then ak:= 1 else ak:= 2 fi;
          A[v..N]:= map(`+`,A[v..N] ,ai*aj*ak);
    od od od:
    convert(A,list); # Robert Israel, May 01 2019

A380832 Number of points in Z^4 of norm <= n where the sum of the four entries is even.

Original entry on oeis.org

1, 1, 49, 169, 625, 1465, 3337, 5689, 10009, 15937, 24865, 35761, 51265, 69817, 94849, 124009, 161497, 204529, 260137, 320497, 394705, 478705, 577489, 687913, 819313, 960457, 1127785, 1309153, 1517161, 1742497, 2001505, 2273473, 2585905, 2920009, 3297337, 3700153, 4144105, 4618657, 5145865, 5703073
Offset: 0

Views

Author

Steven Lu, Feb 05 2025

Keywords

Comments

Points in Z^4 with even sum of entries forms the D_4 lattice. That is to say, the sequence is the "ball" pattern on D_4 lattice.
a(n) == 1 (mod 24).

Examples

			a(2) = 49, because in the ball with radius 2, there is 1 point (0,0,0,0), 8 points similar to (0,0,0,2), 24 points similar to (0,0,1,1), and 16 points similar to (1,1,1,1).
		

Crossrefs

Cf. A055410.

Programs

  • PARI
    a(n) = sum(x=-n, n, sum(y=-n, n, sum(z=-n, n, sum(t=-n, n, (((x+y+z+t) % 2)==0) && (x^2+y^2+z^2+t^2 <=n^2))))); \\ Michel Marcus, Feb 09 2025
  • Python
    # See Steven Lu's link
    

A319617 Number of Integer solutions to w^2 + x^2 + y^2 + z^2 < n^2; number of lattice points inside a 4-sphere of radius n.

Original entry on oeis.org

0, 1, 65, 321, 1257, 2873, 6265, 11377, 20161, 31665, 48945, 71401, 102041, 139481, 188753, 247329, 323697, 409457, 516121, 640393, 789161, 955793, 1153025, 1376305, 1637929, 1921049, 2252889, 2615673, 3033665, 3483633, 3990753, 4547945, 5173145, 5840393, 6589945, 7395921, 8287297, 9238001, 10281977, 11402457, 12633145, 13929377
Offset: 0

Views

Author

Brian J. Harrild, Sep 24 2018

Keywords

Examples

			For n=2 there are 65 lattice points in Z^4 such that w^2+x^2+y^2+x^2 < 4
		

Crossrefs

a(n) = A055410(n) - A267326(n).

Programs

  • Python
    for n in range (0,51):
        NumPoints=0
        for w in range (-n,n+1):
            for x in range (-n,n+1):
                for y in range (-n,n+1):
                    for z in range (-n,n+1):
                        if w**2+x**2+y**2+z**2
    				
Showing 1-9 of 9 results.