OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = n^2*(binomial(n, 2) + 1).
G.f.: x*(1 + 3*x + 6*x^2 + 2*x^3)/(1-x)^5. [Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009; corrected by R. J. Mathar, Sep 16 2009]
From Stefano Spezia, Oct 08 2022: (Start)
E.g.f.: exp(x)*x*(2 + 6*x + 5*x^2 + x^3)/2.
MATHEMATICA
Coefficient[Table[Expand[(1+n x+n x^2)^n], {n, 60}], x, 2] (* Harvey P. Dale, Mar 13 2011 *)
Table[n^2 (Binomial[n, 2] + 1), {n, 40}] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {1, 8, 36, 112, 275}, 40] (* Vincenzo Librandi, Aug 15 2017 *)
PROG
(PARI) q(n)=(1+n*X+n*X^2)^n; for(i=1, 40, print1(", "polcoeff(q(i), 2)))
(Magma) [n^2*(Binomial(n, 2)+1): n in [1..40]]: // Vincenzo Librandi, Aug 15 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Mar 19 2004
STATUS
approved