OFFSET
1,2
COMMENTS
If 0 is replaced by 2 (as in A007931) "length + 0-bits" is simply the total of ternary digits (e.g., 3 for 21 instead of 01).
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-1,-4,4,-2,1,1,-1)
FORMULA
G.f.: x*(-x^7-x^4+3x^3-2x^2-x+1)/((1-x-x^2)*(1-x^2-x^4)*(1-x)^2).
EXAMPLE
a(3) = 3: 0 01 111 (e.g. 01: length 2 + 1 zero = 3).
a(4) = 6: 0 01 00 011 101 1111.
a(5) =10: 0 01 00 011 101 001 010 0111 1011 11111.
MATHEMATICA
CoefficientList[Series[x (-x^7-x^4+3x^3-2x^2-x+1)/((1-x-x^2) (1-x^2-x^4) (1-x)^2), {x, 0, 50}], x] (* Harvey P. Dale, Jun 15 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank Ellermann, Dec 02 2001
EXTENSIONS
More terms from Harvey P. Dale, Jun 15 2011
STATUS
approved