A384497 a(n) is the number of binary strings of length n which contain exactly one run of 1s of even length.
0, 0, 1, 2, 6, 12, 28, 56, 119, 236, 479, 940, 1859, 3612, 7028, 13538, 26051, 49820, 95098, 180774, 342944, 648648, 1224517, 2306338, 4336449, 8138516, 15250965, 28535528, 53320792, 99504804, 185474501, 345332950, 642310142, 1193510160, 2215702468, 4109801864
Offset: 0
Examples
a(3)=2 because of the strings 011 and 110.
Links
- Index entries for linear recurrences with constant coefficients, signature (2,3,-6,-2,4,-1).
Crossrefs
Cf. A029907.
Programs
-
Mathematica
CoefficientList[Series[((1 - x^2) * x^2)/(1 - x - 2 * x^2 + x^3)^2,{x,0,35}],x] (* Stefano Spezia, Jun 02 2025 *)
Formula
G.f.: ((1 - x^2) * x^2)/(1 - x - 2 * x^2 + x^3)^2.