cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A092365 Coefficient of X^2 in expansion of (1 + n*X + n*X^2)^n.

Original entry on oeis.org

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

Views

Author

Jon Perry, Mar 19 2004

Keywords

Crossrefs

Programs

  • Magma
    [n^2*(Binomial(n, 2)+1): n in [1..40]]; // Vincenzo Librandi, Aug 15 2017
  • 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 *)
  • PARI
    q(n)=(1+n*X+n*X^2)^n; for(i=1,40,print1(","polcoeff(q(i),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)