OFFSET
1,2
COMMENTS
First differences of A072474 (sum of next n squares).
LINKS
Kelvin Voskuijl, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: x*(1+3*x+x^2)*(1+4*x+x^2)/(1-x)^5. - Jinyuan Wang, Jan 23 2025
E.g.f.: exp(x)*(4 + 22*x^2 + 20*x^3 + 5*x^4)/4 - 1. - Stefano Spezia, Jan 28 2025
MATHEMATICA
Table[((n^2 - n + 2)*(5*n^2 - 5*n + 2))/4, {n, 1, 40}]
PROG
(PARI) a(n) = (n^2 - n + 2) * (5*n^2 - 5*n + 2) / 4
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kelvin Voskuijl, Jan 22 2025
STATUS
approved
