%I #30 Aug 24 2019 20:56:51
%S 1,5,6,10,14,15,19,20,24,28,29,33,37,38,42,43,47,51,52,56,57,61,65,66,
%T 70,74,75,79,80,84,88,89,93,97,98,102,103,107,111,112,116,117,121,125,
%U 126,130,134,135,139,140,144,148,149,153,154,158,162,163,167
%N Positions of 1's in A287663; complement of A287664.
%C Conjecture: 0 < n*r - a(n) < 3 for n >= 1, where r = (-1 + 3*sqrt(5))/2. [Corrected by _Clark Kimberling_, Aug 19 2019]
%C From _Michel Dekking_, Aug 21 2019: (Start)
%C Proof of Maiga's conjecture: let T denote the morphism {0->1, 1->000}.
%C The Fibonacci word xF:=A003849 is fixed point of the morphism 0->01, 1->0 and therefore xF is a concatenation of the two words v=01 and w=0, where these words occur as the Fibonacci word itself.
%C Now note that
%C T(v) = T(01) = 1000, T(w) = T(0) = 1.
%C We see from this that the sequence of first differences of A287665, Delta A287665 = 4,1,4,4,1,4,1,4,4,1,..., is a sequence on the letters 4 and 1, and that in fact these two letters occur as the Fibonacci word on the alphabet {4,1}.
%C Since A001468 (starting from n=1) is the Fibonacci word on the alphabet {2,1}, Maiga's formula follows.
%C Proof of Kimberling's conjecture.
%C It follows from the result above by Lemma 8 in the Allouche-Dekking paper that A287665 is a generalized Beatty sequence
%C a(n) = 3*floor(n*phi) - 2*n.
%C So if r = (-1 + 3*sqrt(5))/2 = 3*phi - 2, then
%C n*r - a(n) = n*(3*phi-2) - [3*(n*phi-{n*phi})]-2*n = 3*{n*phi}, where {} denotes fractional part.
%C It follows that 0 < n*r - a(n) < 3. Moreover, these bounds are tight, since the sequence ({n*phi}) is equidistributed on (0,1).
%C (End)
%H Clark Kimberling, <a href="/A287665/b287665.txt">Table of n, a(n) for n = 1..10000</a>
%H J.-P. Allouche, F. M. Dekking, <a href="https://arxiv.org/abs/1809.03424">Generalized Beatty sequences and complementary triples</a>, arXiv:1809.03424 [math.NT], 2018.
%F a(n) = Sum_{k=0..n-1} [3*A001468(k)-2] (conjectured). - _Jon Maiga_, Dec 30 2018
%F a(n) = 3*floor(n*phi) - 2*n. - _Michel Dekking_, Aug 21 2019
%t s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 10] (* A003849 *)
%t w = StringJoin[Map[ToString, s]]
%t w1 = StringReplace[w, {"0" -> "1", "1" -> "000"}]
%t st = ToCharacterCode[w1] - 48 (* A287663 *)
%t Flatten[Position[st, 0]] (* A287664 *)
%t Flatten[Position[st, 1]] (* A287665 *)
%Y Cf. A287663, A287664, A001468.
%K nonn,easy
%O 1,2
%A _Clark Kimberling_, Jun 02 2017