OFFSET
0,4
COMMENTS
a(n) is the number of compositions of n+2 such that: i) the first part is odd, ii) the last part is even, and iii) no two consecutive parts have the same parity. - Geoffrey Critzer, Mar 04 2012
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,2,1,-1).
EXAMPLE
a(7) = 5 because there are 5 such compositions of the integer 9: 1+8, 7+2, 3+6, 5+4, 1+2+1+2+1+2. - Geoffrey Critzer, Mar 04 2012
MATHEMATICA
nn = 44; a = x/(1 - x^2); b = x^2/(1 - x^2); Drop[ CoefficientList[Series[1/(1 - a b), {x, 0, nn}], x], 2] (* Geoffrey Critzer, Mar 04 2012 *)
CoefficientList[Series[x/(1-2x^2-x^3+x^4), {x, 0, 50}], x] (* Harvey P. Dale, Jul 17 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 16 2006
STATUS
approved