OFFSET
1,3
COMMENTS
This is the runlength sequence for C = (1/2)*(3/4)*(7/8)*(15/16)... in each base (2,3,4,...); for base 10, we have C = 0.8900100999989990000001000..., as in A132038.
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
a(3n) = 2n for n > 0, a(3n+1) = 1 for n >= 0, a(3n+2) = n + 1 for n >= 0.
G.f.: x*(1 + x + 2*x^2 - x^3)/((1 - x)*(1 + x + x^2)). - Andrew Howroyd, Oct 31 2025
EXAMPLE
(zero-one sequence at A270742) = (0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,...), with first 6 runs 0, 1, 00, 1, 00, 1111 of lengths 1,1,2,1,2,4.
MATHEMATICA
d = Join[{0}, RealDigits[QPochhammer[1/2], 2, 200000][[1]]];
u = Map[Length, Split[d]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 04 2016
STATUS
approved
