login
A098601
Expansion of (1+2*x)/((1+x)*(1-x^2-x^3)).
4
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,4
COMMENTS
Diagonal sums of A098599.
The signed sequence 1,-1,0,-3,0,-4,... gives the diagonal sums of A100218. - Paul Barry, Nov 09 2004
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
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 *)
PROG
(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
(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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 17 2004
STATUS
approved