login
A288534
a(n) = n*(2*n^2 + 3), n >= 1; a(0)=1.
1
1, 5, 22, 63, 140, 265, 450, 707, 1048, 1485, 2030, 2695, 3492, 4433, 5530, 6795, 8240, 9877, 11718, 13775, 16060, 18585, 21362, 24403, 27720, 31325, 35230, 39447, 43988, 48865, 54090, 59675, 65632, 71973, 78710, 85855, 93420, 101417, 109858, 118755, 128120, 137965
OFFSET
0,2
COMMENTS
a(n) is the sum of consecutive strings of positive integers of length 2*n, starting with the integer 2; and a(0) = 1.
FORMULA
From Colin Barker, Aug 14 2017: (Start)
G.f.: (1 + x + 8*x^2 + x^3 + x^4) / (1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 4.
(End)
EXAMPLE
a(1) = 5 = 2 + 3;
a(2) = 22 = 4 + 5 + 6 + 7;
a(3) = 63 = 8 + 9 + 10 + 11 + 12 + 13.
MATHEMATICA
Table[Boole[n == 0] + n (2 n^2 + 3), {n, 0, 41}] (* or *)
CoefficientList[Series[(1 + x + 8 x^2 + x^3 + x^4)/(1 - x)^4, {x, 0, 41}], x] (* Michael De Vlieger, Aug 15 2017 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 5, 22, 63, 140}, 50] (* Harvey P. Dale, Jul 12 2022 *)
PROG
(PARI) a(n) = if (n==0, 1, n*(2*n^2 + 3)); \\ Michel Marcus, Aug 14 2017
(PARI) Vec((1 + x + 8*x^2 + x^3 + x^4) / (1 - x)^4 + O(x^60)) \\ Colin Barker, Aug 14 2017
CROSSREFS
Sequence in context: A212094 A064836 A273311 * A286711 A222632 A366081
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Aug 12 2017
STATUS
approved