A285953 Positions of 0 in A285952; complement of A285954.
3, 5, 8, 12, 14, 18, 21, 23, 26, 30, 33, 35, 39, 41, 44, 48, 50, 54, 57, 59, 63, 65, 68, 72, 75, 77, 80, 84, 86, 90, 93, 95, 98, 102, 105, 107, 111, 113, 116, 120, 123, 125, 128, 132, 134, 138, 141, 143, 147, 149, 152, 156, 158, 162, 165, 167, 170, 174, 177
Offset: 1
Examples
As a word, A285952 = 110101101110101..., in which 0 is in positions 3,5,8,12,...
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 7] (* Thue-Morse, A010060 *) w = StringJoin[Map[ToString, s]] w1 = StringReplace[w, {"0" -> "1", "1" -> "10"}] (* A285952, word *) st = ToCharacterCode[w1] - 48 (* A285952, sequence *) Flatten[Position[st, 0]] (* A285953 *) Flatten[Position[st, 1]] (* A285954 *)
-
Python
def A285953(n): return 3*n-(((n<<1)-1).bit_count()&1^1) # Chai Wah Wu, Nov 18 2024
Formula
a(n) = 3n-1 + A010060(2n) - Michel Dekking, Jan 05 2018
Comments