%I #22 Jun 18 2022 17:50:04
%S 0,1,0,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,1,0,0,1,1,0,1,0,0,1,1,0,1,0,1,
%T 0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,1,0,0,1,1,0,1,0,1,0,0,1,1,
%U 0,0,1,1,0,1,0,0,1,1,0,1,0,1,0,0,1,1
%N Fixed point of the morphism 0 -> 01, 1 -> 0011.
%C Let u(n) = # 0's <= n and v(n) = # 1's <= n. Then 2n - u(n) is in {1,2} and 2n-v(n) is in {-1,0}, for all n>=1.
%C This conjecture is false, since 2n - u(n) > n. - _Michel Dekking_, Oct 14 2019
%C From _Michel Dekking_, Oct 14 2019: (Start)
%C This sequence, as a word, has the remarkable property that it is an automatic sequence, i.e., the letter-to-letter image of a fixed point of a uniform morphism, given by
%C a->abc, b->deb, c->aba, d->bcd, e->ebc.
%C The letter-to-letter map is given by a->0, b-> 1, c->0, d->0, e->1.
%C For an algorithm to find this morphism, and the letter-to-letter map see Section V of the paper "The spectrum of dynamical systems arising from substitutions of constant length".
%C (N.B. The algorithm gives a morphism on an alphabet of 6 letters, but it is possible to merge two of them, because they have the same images under the morphism and under the letter-to-letter map.)
%C (End)
%H Clark Kimberling, <a href="/A284775/b284775.txt">Table of n, a(n) for n = 1..10000</a>
%H J.-P. Allouche, F. M. Dekking, and M. Queffélec, <a href="https://arxiv.org/abs/2010.00920">Hidden automatic sequences</a>, arXiv:2010.00920 [math.NT], 2020.
%H F. M. Dekking, <a href="http://www.numdam.org/item/?id=PSMIR_1976___2_A6_0">The spectrum of dynamical systems arising from substitutions of constant length</a>, Publications mathématiques et informatique de Rennes, no. 2 (1976), Exposé no. 6, 34 p.
%H F. M. Dekking, <a href="https://doi.org/10.1007/BF00534241">The spectrum of dynamical systems arising from substitutions of constant length</a>, Z. Wahrscheinlichkeitstheorie und verw. Gebiete 41 (1978), 221-239.
%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>
%F a(n) = 1 if (a(n-2)=0, a(n-1)=0) or (a(n-3)=0, a(n-2)=1, a(n-1)=0); otherwise a(n)=0.
%F This formula is not correct, since a(9)=0, a(10)=1, a(11)=0, but a(12)=0. - _Michel Dekking_, Oct 14 2019
%e 0 -> 01-> 0011 -> 010100110011 ->
%t s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0, 0, 1, 1}}] &, {0}, 7]; (* A284775 *)
%t Flatten[Position[s, 0]]; (* A284776 *)
%t Flatten[Position[s, 1]]; (* A284777 *)
%t Flatten[SubstitutionSystem[{0->{0,1},1->{0,0,1,1}},{0},{5}]] (* _Harvey P. Dale_, Jun 18 2022 *)
%Y Cf. A284776, A284777, A284793 (difference sequence; 3 distinct terms), A284794, A284795, A284796.
%K nonn,easy
%O 1
%A _Clark Kimberling_, Apr 14 2017