OFFSET
0,1
COMMENTS
Sums of eight consecutive squares.
More generally, the ordinary generating function for the sums of m consecutive squares of nonnegative integers is m*(1 - 2*x + 13*x^2 + 2*m^2 (1 - 2*x + x^2) - 3*m*(1 - 4*x + 3*x^2))/(6*(1 - x)^3).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
O.g.f.: 4*(35 - 54*x + 23*x^2)/(1 - x)^3.
E.g.f.: 4*(35 + 16*x + 2*x^2)*exp(x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(-n) = a(n-7).
a(n) = n^2 + (n+1)^2 + (n+2)^2 + (n+3)^2 + (n+4)^2 + (n+5)^2 + (n+6)^2 + (n+7)^2.
a(n) = 8*n^2 + 56*n + 140.
Sum_{n>=0} 1/a(n) = tanh(sqrt(21)*Pi/2)*Pi/(8*sqrt(21)) - 763/15180. - Amiram Eldar, Sep 15 2022
EXAMPLE
a(0) = 0^2 + 1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2 + 7^2 = 140;
a(1) = 1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2 + 7^2 + 8^2 = 204;
a(2) = 2^2 + 3^2 + 4^2 + 5^2 + 6^2 + 7^2 + 8^2 + 9^2 = 284, etc.
MATHEMATICA
Table[8 n^2 + 56 n + 140, {n, 0, 50}]
LinearRecurrence[{3, -3, 1}, {140, 204, 284}, 51]
PROG
(PARI) a(n)=8*n^2+56*n+140 \\ Charles R Greathouse IV, Jun 17 2017
(Magma) [4*(2*n^2 +14*n +35): n in [0..60]]; // G. C. Greubel, Aug 24 2022
(SageMath) [4*(2*n^2 +14*n +35) for n in (0..60)] # G. C. Greubel, Aug 24 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Aug 16 2016
STATUS
approved