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+11*x+x^2)/(1-x)^4. - Colin Barker, Apr 20 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>3. - Vincenzo Librandi, Dec 16 2015
E.g.f.: (-6 + 12*x + 39*x^2 + 26*x^3)*exp(x)/6 + 1. - G. C. Greubel, Dec 01 2017
MATHEMATICA
Table[(2 n - 1) (13 n^2 - 13 n + 6)/6, {n, 1, 40}] (* Bruno Berselli, Dec 16 2015 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 16, 70, 189}, 30] (* G. C. Greubel, Dec 01 2017 *)
PROG
(PARI) a(n) = { (2*n - 1)*(13*n^2 - 13*n + 6)/6 } \\ Harry J. Smith, Aug 23 2009
(PARI) my(x='x+O('x^30)); Vec(serlaplace((-6+12*x+39*x^2+26*x^3)*exp(x)/6 + 1)) \\ G. C. Greubel, Dec 01 2017
(Python)
A063493_list, m = [], [26, -13, 2, 1]
for _ in range(10**2):
A063493_list.append(m[-1])
for i in range(3):
m[i+1] += m[i] # Chai Wah Wu, Dec 15 2015
(Magma) [(2*n-1)*(13*n^2-13*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