login
a(n) = [x^n] ((x^2 - 1)*(x^2 + x - 1))/(x^2 + 2*x - 1)^2.
3

%I #16 Sep 08 2022 08:46:25

%S 1,3,8,23,64,175,472,1259,3328,8731,22760,59007,152256,391239,1001656,

%T 2556115,6503936,16505651,41788616,105571303,266181440,669923039,

%U 1683255448,4222878651,10579130112,26467818315,66138242984,165077936207,411584855488,1025162759287

%N a(n) = [x^n] ((x^2 - 1)*(x^2 + x - 1))/(x^2 + 2*x - 1)^2.

%H Colin Barker, <a href="/A331321/b331321.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-2,-4,-1).

%F a(n) = Sum_{k=0..n} A193737(n, k)*(1 + k).

%F Let h(k) = (1 + k)*exp((1 + k)*x)*(2*x + 10 - 5*k)/8 then

%F a(n) = n!*[x^n](h(sqrt(2)) + h(-sqrt(2)) + 1).

%F From _Colin Barker_, Jan 14 2020: (Start)

%F a(n) = 4*a(n-1) - 2*a(n-2) - 4*a(n-3) - a(n-4) for n>4.

%F 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.

%F (End)

%p gf := ((x^2 - 1)*(x^2 + x - 1))/(x^2 + 2*x - 1)^2:

%p ser := series(gf, x, 32): seq(coeff(ser, x, n), n=0..29);

%t LinearRecurrence[{4,-2,-4,-1},{1,3,8,23,64},40] (* _Harvey P. Dale_, Feb 01 2022 *)

%o (PARI) Vec((1 - x)*(1 + x)*(1 - x - x^2) / (1 - 2*x - x^2)^2 + O(x^30)) \\ _Colin Barker_, Jan 14 2020

%o (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

%Y Cf. A193737 (Fibonacci (with a(0)=1) triangle), A331319, A331320.

%K nonn,easy

%O 0,2

%A _Peter Luschny_, Jan 14 2020