OFFSET
1,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
T. P. Martin, Shells of atoms, Phys. Reports, 273 (1996), 199-241, eq. (10).
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: x*(1+x)*(1 + 9*x + x^2)/(1-x)^4. - Colin Barker, Apr 24 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4. - Wesley Ivan Hurt, Dec 16 2015
E.g.f.: (-6 + 12*x + 33*x^2 + 22*x^3)*exp(x)/6 + 1. - G. C. Greubel, Dec 01 2017
MAPLE
A063492:=n->(2*n - 1)*(11*n^2 - 11*n + 6)/6: seq(A063492(n), n=1..50); # Wesley Ivan Hurt, Dec 16 2015
MATHEMATICA
Table[(2*n-1)*(11*n^2-11*n+6)/6, {n, 5!}] (* Vladimir Joseph Stephan Orlovsky, Sep 18 2008 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 14, 60, 161}, 40] (* Vincenzo Librandi, Dec 16 2015 *)
PROG
(PARI) { for (n=1, 1000, write("b063492.txt", n, " ", (2*n - 1)*(11*n^2 - 11*n + 6)/6) ) } \\ Harry J. Smith, Aug 23 2009
(PARI) Vec(x*(1+x)*(1+9*x+x^2)/(1-x)^4 + O(x^100)) \\ Altug Alkan, Dec 16 2015
(Python)
A063492_list, m = [], [22, -11, 2, 1]
for _ in range(10**2):
A063492_list.append(m[-1])
for i in range(3):
m[i+1] += m[i] # Chai Wah Wu, Dec 15 2015
(Magma) [(2*n-1)*(11*n^2-11*n+6)/6: n in [1..40]]; // Vincenzo Librandi, Dec 16 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Aug 01 2001
STATUS
approved