login
A092365
Coefficient of X^2 in expansion of (1 + n*X + n*X^2)^n.
2
1, 8, 36, 112, 275, 576, 1078, 1856, 2997, 4600, 6776, 9648, 13351, 18032, 23850, 30976, 39593, 49896, 62092, 76400, 93051, 112288, 134366, 159552, 188125, 220376, 256608, 297136, 342287, 392400, 447826, 508928, 576081, 649672, 730100, 817776
OFFSET
1,2
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.
a(n) = A000290(n)*A152947(n+1). (End)
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
Sequence in context: A357716 A341987 A341068 * A014343 A162596 A331999
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Mar 19 2004
STATUS
approved