OFFSET
0,10
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,1,0,0,0,0,0,0,2).
FORMULA
a(0)=1, a(1)=1, a(2)=1, a(3)=1, a(4)=1, a(5)=1, a(6)=1, a(7)=1, a(8)=1; a(n) = 2*a(n-9) + a(n-2) for n>=9.
G.f. (1+x)/(1-x^2-2x^9).
a(2*n) = Sum_{j=0..n/9} Binomial[n-7j, 2j]*2^{2j} + Sum_{j=0..(n-5)/9} Binomial[n-4-7j, 2j+1]*2^{2j+1}.
a(2*n+1) = Sum_{j=0..n/9} Binomial[n-7j, 2j]*2^{2j} + Sum_{j=0..(n-4)/9} Binomial[n-3-7j, 2j+1]*2^{2j+1}.
EXAMPLE
a(9)=2a(0)+a(7)=3; a(10)=2a(1)+a(8)=3; a(11)=2a(2)+a(9)=5.
MATHEMATICA
For[j = 0, j < 9, j++, a[j] = 1]
For[j = 9, j < 51, j++, a[j] = 2 a[j - 9] + a[j - 2]]
Table[a[j], {j, 0, 50}]
CoefficientList[Series[(1 + x)/(1 - x^2 - 2 x^9), {x, 0, 50}], x] (* G. C. Greubel, May 01 2017 *)
PROG
(PARI) Vec((1+x)/(1-x^2-2*x^9)+O(x^99)) \\ Charles R Greathouse IV, Mar 06 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sergio Falcon, Feb 12 2014
STATUS
approved