OFFSET
1,2
COMMENTS
Conjecture: 3n/2 - a(n) is in {0, 1/2, 1} for all n >= 1.
From Michel Dekking, Sep 03 2019: (Start)
Proof of the conjecture by Kimberling: more is true. Here follows a proof of the formula below. Let T be the transform T(01)=0, T(1)=0.
Consider the return word structure of A285949 for the word 0:
A285949 = 01| 0| 0| 01| 0| 01| 01| 0| 0| 01| 01| ....
[See Justin & Vuillon (2000) for definition of return word. - N. J. A. Sloane, Sep 23 2019]
The two return words are v:=0 and w:=01. Always v = T(1)and w = T(01) in this decomposition of the image T(A010060) of A010060 under the transform. It follows that the return words occur as the Thue-Morse word 21121221211... on the alphabet {2,1}. But the lengths of the return words corresponds to the differences between the indices where the 0's occur in A285949, which generate (a(n)).
As the Thue-Morse word is a concatenation of 12 and 21 which, considered as integers, both add to 3, it follows that a(2n+1) = 3n+1. Similarly, it follows that a(2n) = 3n - A010060(n-1).
(End)
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.
FORMULA
a(2n) = 3n - A010060(n-1); a(2n+1) = 3n + 1. - Michel Dekking, Sep 03 2019
EXAMPLE
As a word, A285949 = 0100010010100010100100010..., in which 0 is in positions 1,3,4,5,7,...
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"}] (* A285949, word *)
st = ToCharacterCode[w1] - 48 (* A285949, sequence *)
Flatten[Position[st, 0]] (* A285950 *)
Flatten[Position[st, 1]] (* A285951 *)
PROG
(PARI) a(n) = (3*n)>>1 - if(n%2==0, hammingweight(n-2)%2); \\ Kevin Ryde, Jan 28 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 02 2017
STATUS
approved