A098601 Expansion of (1+2*x)/((1+x)*(1-x^2-x^3)).
1, 1, 0, 3, 0, 4, 2, 5, 5, 8, 9, 14, 16, 24, 29, 41, 52, 71, 92, 124, 162, 217, 285, 380, 501, 666, 880, 1168, 1545, 2049, 2712, 3595, 4760, 6308, 8354, 11069, 14661, 19424, 25729, 34086, 45152, 59816, 79237, 104969, 139052, 184207, 244020, 323260
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-1,1,2,1).
Programs
-
Magma
I:=[1,1,0,3]; [n le 4 select I[n] else -Self(n-1) +Self(n-2) +2*Self(n-3) +Self(n-4): n in [1..55]]; // G. C. Greubel, Mar 27 2024
-
Mathematica
CoefficientList[Series[(1+2x)/((1+x)(1-x^2-x^3)),{x,0,50}],x] (* or *) LinearRecurrence[{-1,1,2,1},{1,1,0,3},50] (* Harvey P. Dale, Dec 14 2011 *)
-
SageMath
def A098601(n): return sum( binomial(k, n-2*k) + binomial(k-1, n-2*k-1) for k in range(1+n//2)) [A098601(n) for n in range(56)] # G. C. Greubel, Mar 27 2024
Formula
G.f.: x/((1+x)*(1-x^2-x^3)) + 1/(1-x^2-x^3).
a(n) = Sum_{k=0..floor(n/2)} (binomial(k, n-2*k) + binomial(k-1, n-2*k-1)).
a(n) = -a(n-1) + a(n-2) + 2*a(n-3) + a(n-4).
Inverse binomial transform of A135364. - Paul Curtz, Apr 25 2008
Comments