OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,3,-6,-3,6,1,-2).
FORMULA
G.f.: (1 - x - 3*x^2 + 6*x^3 - 3*x^4 - 2*x^5 - 3*x^6 + x^7)/( (1 - 2*x)*(1 - x^2)^3 ).
a(n) = (2^(1+n))/4 for n even; a(n) = (2^(1+n)-2*n+2*n^2)/4 for n odd. - Colin Barker, Jan 23 2014
E.g.f.: (1 + cosh(2*x) + x^2*sinh(x) + sinh(2*x))/2. - Stefano Spezia, Mar 20 2022
EXAMPLE
a(3)=7 because we have: 001, 010, 011, 100, 101, 110, 111.
MATHEMATICA
nn=30; CoefficientList[Series[(1-x-3*x^2+6*x^3-3*x^4-2*x^5-3*x^6+x^7)/ ((1-2*x)*(1-x^2)^3), {x, 0, nn}], x]
LinearRecurrence[{2, 3, -6, -3, 6, 1, -2}, {1, 1, 2, 7, 8, 26, 32, 85}, 40] (* Harvey P. Dale, Dec 18 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Geoffrey Critzer, Jan 21 2014
EXTENSIONS
More terms from Colin Barker, Jan 23 2014
STATUS
approved