OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-2,-4,-1).
FORMULA
a(n) = Sum_{k=0..n} A193737(n, k)*(1 + k).
Let h(k) = (1 + k)*exp((1 + k)*x)*(2*x + 10 - 5*k)/8 then
a(n) = n!*[x^n](h(sqrt(2)) + h(-sqrt(2)) + 1).
From Colin Barker, Jan 14 2020: (Start)
a(n) = 4*a(n-1) - 2*a(n-2) - 4*a(n-3) - a(n-4) for n>4.
a(n) = (-5*sqrt(2)*((1-sqrt(2))^n - (1+sqrt(2))^n) + 2*((1-sqrt(2))^n + (1+sqrt(2))^n)*n) / 8 for n>0.
(End)
MAPLE
gf := ((x^2 - 1)*(x^2 + x - 1))/(x^2 + 2*x - 1)^2:
ser := series(gf, x, 32): seq(coeff(ser, x, n), n=0..29);
MATHEMATICA
LinearRecurrence[{4, -2, -4, -1}, {1, 3, 8, 23, 64}, 40] (* Harvey P. Dale, Feb 01 2022 *)
PROG
(PARI) Vec((1 - x)*(1 + x)*(1 - x - x^2) / (1 - 2*x - x^2)^2 + O(x^30)) \\ Colin Barker, Jan 14 2020
(Magma) R<x>:=PowerSeriesRing(Integers(), 33); Coefficients(R!( (1 - x)*(1 + x)*(1-x-x^2) / (1-2*x-x^2)^2 )); // Marius A. Burtea, Jan 15 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Jan 14 2020
STATUS
approved