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.

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