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.

A000143 Number of ways of writing n as a sum of 8 squares.

Original entry on oeis.org

1, 16, 112, 448, 1136, 2016, 3136, 5504, 9328, 12112, 14112, 21312, 31808, 35168, 38528, 56448, 74864, 78624, 84784, 109760, 143136, 154112, 149184, 194688, 261184, 252016, 246176, 327040, 390784, 390240, 395136, 476672, 599152, 596736, 550368, 693504, 859952
Offset: 0

Views

Author

Keywords

Comments

The relevant identity for the o.g.f. is theta_3(x)^8 = 1 + 16*Sum_{j >= 1} j^3*x^j/(1 - (-1)^j*x^j). See the Hardy-Wright reference, p. 315. - Wolfdieter Lang, Dec 08 2016

Examples

			1 + 16*q + 112*q^2 + 448*q^3 + 1136*q^4 + 2016*q^5 + 3136*q^6 + 5504*q^7 + ...
		

References

  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 77, Eq. (31.61); p. 79 Eq. (32.32).
  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 121.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, pp. 314 - 315.

Crossrefs

8th column of A286815. - Seiichi Manyama, May 27 2017
Row d=8 of A122141.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cf. A004018, A000118, A000141 for the expansion of the powers of 2, 4, 6 of theta_3(x).

Programs

  • Julia
    # JacobiTheta3 is defined in A000122.
    A000143List(len) = JacobiTheta3(len, 8)
    A000143List(37) |> println # Peter Luschny, Mar 12 2018
    
  • Maple
    (sum(x^(m^2),m=-10..10))^8;
    with(numtheory); rJ := n-> if n=0 then 1 else 16*add((-1)^(n+d)*d^3, d in divisors(n)); fi; [seq(rJ(n),n=0..100)]; # N. J. A. Sloane, Sep 15 2018
  • Mathematica
    Table[SquaresR[8, n], {n, 0, 33}] (* Ray Chandler, Dec 06 2006 *)
    SquaresR[8,Range[0,50]] (* Harvey P. Dale, Aug 26 2011 *)
    QP = QPochhammer; s = (QP[q^2]^5/(QP[q]*QP[q^4])^2)^8 + O[q]^40; CoefficientList[s, q] (* Jean-François Alcover, Dec 01 2015, adapted from PARI *)
  • PARI
    {a(n) = if( n<1, n==0, 16 * (-1)^n * sumdiv( n, d, (-1)^d * d^3))}
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^5 / (eta(x + A) * eta(x^4 + A))^2)^8, n))} /* Michael Somos, Sep 25 2005 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A000143(n): return prod((p**(3*(e+1))-(1 if p&1 else 15))//(p**3-1) for p, e in factorint(n).items())<<4 if n else 1 # Chai Wah Wu, Jun 21 2024
  • SageMath
    Q = DiagonalQuadraticForm(ZZ, [1]*8)
    Q.representation_number_list(60) # Peter Luschny, Jun 20 2014
    

Formula

Expansion of theta_3(z)^8. Also a(n)=16*(-1)^n*Sum_{0
Expansion of phi(q)^8 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Mar 21 2008
Expansion of (eta(q^2)^5 / (eta(q) * eta(q^4))^2)^8 in powers of q. - Michael Somos, Sep 25 2005
G.f.: s(2)^40/(s(1)*s(4))^16, where s(k) := subs(q=q^k, eta(q)) and eta(q) is Dedekind's function, cf. A010815. [Fine]
Euler transform of period 4 sequence [16, -24, 16, -8, ...]. - Michael Somos, Apr 10 2005
a(n) = 16 * b(n) and b(n) is multiplicative with b(p^e) = (p^(3*e+3) - 1) / (p^3 - 1) -2[p<3]. - Michael Somos, Sep 25 2005
G.f.: 1 + 16 * Sum_{k>0} k^3 * x^k / (1 - (-x)^k). - Michael Somos, Sep 25 2005
A035016(n) = (-1)^n * a(n). 16 * A008457(n) = a(n) unless n=0.
Dirichlet g.f.: Sum_{n>=1} a(n)/n^s = 16*(1 - 2^(1-s) + 4^(2-s))*zeta(s)*zeta(s-3). [Borwein and Choi], R. J. Mathar, Jul 02 2012
a(n) = (16/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
Sum_{k=1..n} a(k) ~ Pi^4 * n^4 /24. - Vaclav Kotesovec, Jul 12 2024