A285951 Positions of 1's in A285949; complement of A285950.
2, 6, 9, 11, 15, 17, 20, 24, 27, 29, 32, 36, 38, 42, 45, 47, 51, 53, 56, 60, 62, 66, 69, 71, 74, 78, 81, 83, 87, 89, 92, 96, 99, 101, 104, 108, 110, 114, 117, 119, 122, 126, 129, 131, 135, 137, 140, 144, 146, 150, 153, 155, 159, 161, 164, 168, 171, 173, 176
Offset: 1
Examples
As a word, A285949 = 0100010010100010100100010..., in which 1 is in positions 2,6,9,11,...
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
- Jacques Justin and Laurent Vuillon, Return words in Sturmian and episturmian words, RAIRO-Theoretical Informatics and Applications 34.5 (2000): 343-356.
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" -> "01", "1" -> "0"}] (* A284949, word *) st = ToCharacterCode[w1] - 48 (* A284949, sequence *) Flatten[Position[st, 0]] (* A285950 *) Flatten[Position[st, 1]] (* A285951 *)
-
Python
def A285951(n): return ((n-1).bit_count()&1)+3*n-1 # Chai Wah Wu, May 21 2025
Formula
a(n) = A010060(n) + 3n-1. - Michel Dekking, Sep 03 2019
Comments