A270743 Runlength sequence of the zero-one sequence A270742.
1, 1, 2, 1, 2, 4, 1, 3, 6, 1, 4, 8, 1, 5, 10, 1, 6, 12, 1, 7, 14, 1, 8, 16, 1, 9, 18, 1, 10, 20, 1, 11, 22, 1, 12, 24, 1, 13, 26, 1, 14, 28, 1, 15, 30, 1, 16, 32, 1, 17, 34, 1, 18, 36, 1, 19, 38, 1, 20, 40, 1, 21, 42, 1, 22, 44, 1, 23, 46, 1, 24, 48, 1, 25
Offset: 1
Examples
(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.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
d = Join[{0}, RealDigits[QPochhammer[1/2], 2, 200000][[1]]]; u = Map[Length, Split[d]]
Formula
a(3n) = 2n for n > 0, a(3n+1) = 1 for n >= 0, a(3n+2) = n + 1 for n >= 0.
Comments