A098577 a(n) = Sum_{k=0..floor(n/5)} C(n-3*k,2*k) * 2^k.
1, 1, 1, 1, 1, 3, 7, 13, 21, 31, 47, 77, 133, 231, 391, 645, 1053, 1727, 2863, 4781, 7989, 13303, 22071, 36565, 60621, 100655, 167295, 278077, 461989, 767143, 1273607, 2114661, 3511869, 5833055, 9688527, 16091213, 26723221, 44378967, 73700823
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,0,2).
Programs
-
Magma
I:=[1,1,1,1,1,]; [n le 5 select I[n] else 2*Self(n-1) -Self(n-2) + 2*Self(n-5): n in [1..30]]; // G. C. Greubel, Feb 03 2018
-
Mathematica
LinearRecurrence[{2,-1,0,0,2},{1,1,1,1,1},40] (* Harvey P. Dale, Feb 11 2015 *) CoefficientList[Series[(1-x)/((1-x)^2-2*x^5), {x,0,50}], x] (* G. C. Greubel, Feb 03 2018 *)
-
PARI
x='x+O('x^30); Vec((1-x)/((1-x)^2-2*x^5)) \\ G. C. Greubel, Feb 03 2018
Formula
G.f.: (1-x)/((1-x)^2-2*x^5).
a(n) = a(n-1) - a(n-2) + 2*a(n-5).