OFFSET
1,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
T. P. Martin, Shells of atoms, Phys. Rep., 273 (1996), 199-241, eq. (10).
Index entries for linear recurrences with constant coefficients, signature (4, -6, 4, -1).
FORMULA
From Harvey P. Dale, Dec 18 2011: (Start)
a(1)=1, a(2)=18, a(3)=80, a(4)=217, a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) - a(n-4).
G.f.: (x^3+14*x^2+14*x+1)/(1-x)^4. (End)
E.g.f.: (-2 + 4*x + 15*x^2 + 10*x^3)*exp(x)/2 + 1. - G. C. Greubel, Dec 01 2017
MATHEMATICA
Table[(2n-1)(5n^2-5n+2)/2, {n, 40}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 18, 80, 217}, 40] (* Harvey P. Dale, Dec 18 2011 *)
PROG
(PARI) for (n=1, 1000, write("b063495.txt", n, " ", (2*n - 1)*(5*n^2 - 5*n + 2)/2) ) \\ Harry J. Smith, Aug 23 2009
(PARI) x='x+O('x^30); Vec(serlaplace((-2+4*x+15*x^2+10*x^3)*exp(x)/2 + 1)) \\ G. C. Greubel, Dec 01 2017
(Magma) [(2*n-1)*(5*n^2-5*n+2)/2: n in [1..30]]; // G. C. Greubel, Dec 01 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Aug 01 2001
STATUS
approved