login
A271389
a(n) = 2*a(n-1) + a(n-2) + n^2 for n > 1, with a(0) = 0, a(1) = 1.
0
0, 1, 6, 22, 66, 179, 460, 1148, 2820, 6869, 16658, 40306, 97414, 235303, 568216, 1371960, 3312392, 7997033, 19306782, 46610958, 112529098, 271669595, 655868772, 1583407668, 3822684684, 9228777661, 22280240682, 53789259754, 129858760974, 313506782543, 756872326960
OFFSET
0,3
FORMULA
G.f.: x*(1 + x)/((1 - x)^3*(1 - 2*x - x^2)).
E.g.f.: (1/4)*exp(x)*(-2*(x*(x + 5) + 5) + 7*sqrt(2)*sinh(sqrt(2)*x) + 10*cosh(sqrt(2)*x)).
a(n) = 5*a(n-1) - 8*a(n-2) + 4*a(n-3) + a(n-4) - a(n-5).
a(n) = (1/8)*(-4*(n*(n + 4) + 5) + (10 - 7*sqrt(2))*(1 - sqrt(2))^n + (10 + 7*sqrt(2))*(1 + sqrt(2))^n).
Lim_{n->infinity} a(n + 1)/a(n) = 1 + sqrt(2) = A014176.
a(n) = (A000129(n+3) - A002522(n+2))/2. - R. J. Mathar, Jun 07 2016
MATHEMATICA
RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == 2 a[n - 1] + a[n - 2] + n^2}, a, {n, 31}]
LinearRecurrence[{5, -8, 4, 1, -1}, {0, 1, 6, 22, 66}, 32]
PROG
(PARI) x='x+O('x^99); concat(0, Vec(x*(1+x)/((1-x)^3*(1-2*x-x^2)))) \\ Altug Alkan, Apr 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Apr 06 2016
STATUS
approved