OFFSET
0,2
COMMENTS
The units digit of a(n) is 2 if n=5*t^2 for some natural number t, and 0 otherwise. See Moreno & Wagstaff, p. 258, exercise 2. - Ant King, Mar 17 2013
See A025429 for the number of partitions of n into five nonzero squares. - M. F. Hasler, May 30 2014
Also, theta series of lattice Z^5. - Sean A. Irvine, Jul 27 2020
REFERENCES
E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 128.
J. Carlos Moreno and Samuel S. Wagstaff Jr., Sums Of Squares Of Integers, Chapman & Hall/CRC, (2006). [Ant King, Mar 17 2013]
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
Shi-Chao Chen, Congruences for rs(n), Journal of Number Theory, Volume 130, Issue 9, September 2010, Pages 2028-2032.
S. Cooper, Sums of five, seven and nine squares, Ramanujan J., vol 6, no. 4, (2002) 469-490.
S. C. Milne, Infinite families of exact sums of squares formulas, Jacobi elliptic functions, continued fractions and Schur functions, Ramanujan J., 6 (2002), 7-149.
FORMULA
G.f.: (Sum_{j=-oo..+oo} x^(j^2))^5. - R. J. Mathar, Jul 31 2007
a(n) = (10/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
EXAMPLE
G.f. = 1 + 10*x + 40*x^2 + 80*x^3 + 90*x^4 + 112*x^5 + 240*x^6 + ...
MATHEMATICA
Table[SquaresR[5, n], {n, 0, 46}] (* Ray Chandler, Nov 28 2006 *)
SquaresR[5, Range[0, 50]] (* Harvey P. Dale, Aug 26 2011 *)
PROG
(Sage)
Q = DiagonalQuadraticForm(ZZ, [1]*5)
Q.representation_number_list(47) # Peter Luschny, Jun 20 2014
(PARI) a(n, k=5) = if(n==0, return(1)); if(k <= 0, return(0)); if(k==1, return(issquare(n))); my(count = 0); for(v = 0, sqrtint(n), count += (2 - (v == 0))*if(k > 2, a(n - v^2, k-1), issquare(n - v^2) * (2 - (n - v^2 == 0)))); count; \\ Daniel Suteu, Aug 28 2021
(Python)
# uses Python code from A000118
from math import isqrt
def A000132(n): return A000118(n)+(sum(A000118(n-k**2) for k in range(1, isqrt(n)+1))<<1) # Chai Wah Wu, Jun 23 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Extended by Ray Chandler, Nov 28 2006
STATUS
approved