A098578 a(n) = Sum_{k=0..floor(n/4)} C(n-3*k,k+1).
0, 1, 2, 3, 4, 6, 9, 13, 18, 25, 35, 49, 68, 94, 130, 180, 249, 344, 475, 656, 906, 1251, 1727, 2384, 3291, 4543, 6271, 8656, 11948, 16492, 22764, 31421, 43370, 59863, 82628, 114050, 157421, 217285, 299914, 413965, 571387, 788673, 1088588, 1502554
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-1)
Crossrefs
Cf. A077868.
Programs
-
Magma
I:=[0,1,2,3,4]; [n le 5 select I[n] else 2*Self(n-1) - Self(n-2) + Self(n-4) - Self(n-5): n in [1..30]]; // G. C. Greubel, Feb 03 2018
-
Mathematica
CoefficientList[Series[x/((1-x)^2-x^4*(1-x)), {x,0,50}], x] (* or *) LinearRecurrence[{2,-1,0,1,-1}, {0,1,2,3,4}, 50] (* G. C. Greubel, Feb 03 2018 *)
-
PARI
x='x+O('x^30); concat([0], Vec(x/((1-x)^2-x^4*(1-x)))) \\ G. C. Greubel, Feb 03 2018
Formula
G.f.: x/((1-x)^2-x^4(1-x)) = x / ((x-1)*(x^4+x-1)).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - a(n-5).
a(n) = a(n-1) + a(n-4) + 1.
Comments