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.

A008451 Number of ways of writing n as a sum of 7 squares.

Original entry on oeis.org

1, 14, 84, 280, 574, 840, 1288, 2368, 3444, 3542, 4424, 7560, 9240, 8456, 11088, 16576, 18494, 17808, 19740, 27720, 34440, 29456, 31304, 49728, 52808, 43414, 52248, 68320, 74048, 68376, 71120, 99456, 110964, 89936, 94864, 136080, 145222
Offset: 0

Views

Author

Keywords

References

  • 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, p. 314.

Crossrefs

Row d=7 of A122141 and of A319574, 7th column of A286815.

Programs

  • Maple
    series((sum(x^(m^2),m=-10..10))^7, x, 101);
    # Alternative
    #(requires at least Maple 17, and only works as long as a(n) <= 10^16 or so):
    N:= 1000: # to get a(0) to a(N)
    with(SignalProcessing):
    A:= Vector(N+1,datatype=float[8],i-> piecewise(i=1,1,issqr(i-1),2,0)):
    A2:= Convolution(A,A)[1..N+1]:
    A4:= Convolution(A2,A2)[1..N+1]:
    A5:= Convolution(A,A4)[1..N+1];
    A7:= Convolution(A2,A5)[1..N+1];
    map(round,convert(A7,list)); # Robert Israel, Jul 16 2014
    # Alternative
    A008451list := proc(len) series(JacobiTheta3(0, x)^7, x, len+1);
    seq(coeff(%,x,j), j=0..len-1) end: A008451list(37); # Peter Luschny, Oct 02 2018
  • Mathematica
    Table[SquaresR[7, n], {n, 0, 36}] (* Ray Chandler, Nov 28 2006 *)
    SquaresR[7,Range[0,50]] (* Harvey P. Dale, Aug 26 2011 *)
  • Python
    # uses Python code from A000141
    from math import isqrt
    def A008451(n): return A000141(n)+(sum(A000141(n-k**2) for k in range(1,isqrt(n)+1))<<1) # Chai Wah Wu, Jun 23 2024
  • Sage
    Q = DiagonalQuadraticForm(ZZ, [1]*7)
    Q.representation_number_list(37) # Peter Luschny, Jun 20 2014
    

Formula

G.f.: theta_3(0,x)^7, where theta_3 is the third Jacobi theta function. - Robert Israel, Jul 16 2014
a(n) = (14/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017

Extensions

Extended by Ray Chandler, Nov 28 2006