A137249 Expansion of g.f. z*(2-2*z+z^2+z^3)/((1+z)*(1-3*z+2*z^2-z^3)).
2, 2, 7, 15, 37, 84, 197, 456, 1062, 2467, 5737, 13335, 31002, 72069, 167542, 389486, 905447, 2104907, 4893317, 11375580, 26445017, 61477204, 142917162, 332242091, 772369157, 1795540447, 4174125122, 9703663625, 22558281082
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Richard Choulet, Curtz-like transformation.
- Index entries for linear recurrences with constant coefficients, signature (2,1,-1,1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-2*x+x^2+x^3)/((1+x)*(1-3*x+2*x^2-x^3)) )); // G. C. Greubel, Apr 11 2021 -
Maple
m:= 40; S:= series( x*(2-2*x+x^2+x^3)/((1+x)*(1-3*x+2*x^2-x^3)), x, m+1); seq(coeff(S, x, j), j = 1..m); # G. C. Greubel, Apr 11 2021
-
Mathematica
LinearRecurrence[{2,1,-1,1},{2,2,7,15},30] (* Harvey P. Dale, Feb 02 2012 *)
-
Sage
def A132749_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( (2-2*x+x^2+x^3)/((1+x)*(1-3*x+2*x^2-x^3)) ).list() A132749_list(40) # G. C. Greubel, Apr 11 2021
Formula
O.g.f: z*(2 -2*z +z^2 +z^3)/( (1+z)*(1-3*z+2*z^2-z^3) ).
a(n+4) = 2*a(n+3) + a(n+2) - a(n+1) + a(n).
From G. C. Greubel, Apr 11 2021: (Start)
a(n) = (1/7)*( 4*(-1)^n + Sum_{j=0..floor(n/2)} ( 10*binomial(n+j+2, 3*j+2) - 12*binomial(n+j+1, 3*j+2) + 11*binomial(n+j, 3*j+2) ) ). (End)
Extensions
New name using g.f. from Joerg Arndt, Apr 19 2021
Comments