%I #36 Nov 09 2021 18:24:00
%S 0,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,
%T 0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,
%U 1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,0,0
%N Fixed point of the morphism 0->001, 1->101.
%C Are the positions of 0 given by A026138? Are the positions of 1 given by A026232?
%C This sequence appears to be: 0, followed by A080846. [R. J. Mathar, May 16 2011]
%C From _Michel Dekking_, Oct 26 2019: (Start)
%C Proof of Mathar's third conjecture: Let alpha be the defining morphism for (a(n)): alpha(0)=001, alpha(1)=101. Let beta be the defining morphism for A080846: beta(0)=010, beta(1)=011.
%C To prove the conjecture, it suffices to prove that
%C alpha^n(0) 0 = 0 beta^n(0) for all n>0.
%C This holds for n=1. The important property of the morphisms alpha and beta is that
%C 10^{-1}alpha^n(0) = alpha^n(1) and beta^n(0) = beta^n(1) 1^{-1}0 for all n>0.
%C Here 0^{-1} and 1^{-1} are the free group inverses of 0 and 1.
%C We use this in the induction step:
%C alpha^{n+1}(0) 0 = alpha^n(00)alpha^n(1) 0 =
%C alpha^n(0) alpha^n(0) 10^{-1}alpha^n(0) 0 =
%C 0 beta^n(0) 0^{-1} 0 beta^n(0) 0^{-1} 10^{-1} 0 beta^n(0) 0^{-1} 0 =
%C 0 beta^n(0) beta^n(1)1^{-1}0 0^{-1} 1 beta^n(0) =
%C 0 beta^n(010) = 0 beta^{n+1}(0).
%C (End)
%C From _Michel Dekking_, Oct 26 2019: (Start)
%C Let beta be the defining morphism for this sequence. It is notationally convenient to write the morphism beta on the alphabet {A,B}:
%C beta: A -> AAB, B -> BAB.
%C Let delta be the 'decoration' morphism defined by delta(A) = 0, delta(B) = 10.
%C Let x = AABAABBABA... be the fixed point of beta.
%C CLAIM: delta(x) = A049320, the non-primitive Chacon sequence.
%C This is proved in Ferenczi, 1995. Here in an independent, short proof.
%C Let gamma given by 0->0010, 1->1 be the Chacon morphism, and let
%C c = 0010001010010... be the fixed point of gamma. One verifies that
%C delta(AAB) = delta(AABAABBAB) = gamma(0010),
%C delta(BAB) = delta(BABAABBAB) = gamma(10010).
%C So delta(beta(A)) = gamma(delta(A)), and delta(beta(B)) = gamma(delta(B)).
%C It follows that
%C delta(beta^n(A)) = gamma^n(delta(A)) = gamma^n(0) for all n>0.
%C The left side converges to the delta image of the fixed point x of beta, the right side to c, the non-primitive Chacon sequence.
%C We have shown that the [10->1]-transform of A049320 equals (a(n)).
%C (End)
%C A generalized choral sequence c(3n+r_0)=0, c(3n+r_1)=1, c(3n+r_c)=c(n), with r_0=1, r_1=2, r_c=0, and c(0)=0. - _Joel Reyes Noche_, Jun 14 2021
%D Joel Reyes Noche, Generalized Choral Sequences, Matimyas Matematika, 31(2008), 25-28.
%H S. Ferenczi, <a href="https://doi.org/10.24033/bsmf.2260">Les transformations de Chacon: combinatoire, structure géométrique, lien avec les systèmes de complexité 2n + 1</a>, Bull. Soc. Math. France 123 (1995), 271-292.
%H Joel Reyes Noche, <a href="https://www.adnu.edu.ph/urc/download/p051p069.pdf">On generalized choral sequences</a>, Gibon, IX(2011), 51-69.
%F a(3k-2)=a(k), a(3k-1)=0, a(3k)=1 for k>=1, a(0)=0.
%e Start: 0
%e Rules:
%e 0 --> 001
%e 1 --> 101
%e -------------
%e 0: (#=1)
%e 0
%e 1: (#=3)
%e 001
%e 2: (#=9)
%e 001001101
%e 3: (#=27)
%e 001001101001001101101001101
%e 4: (#=81)
%e 001001101001001101101001101001001101001001101101001101101001101001001101101001101
%t t = Nest[Flatten[# /. {0->{0,0,1}, 1->{1,0,1}}] &, {0}, 5] (*A189640*)
%t f[n_] := t[[n]]
%t Flatten[Position[t, 0]] (*A026138*)
%t Flatten[Position[t, 1]] (*A026232*)
%t s[n_] := Sum[f[i], {i, 1, n}]; s[0] = 0;
%t Table[s[n], {n, 1, 120}] (*A189641*)
%o (PARI) a(n) = my(r); if(n--, until(r, [n,r]=divrem(n,3))); r==2; \\ _Kevin Ryde_, Nov 09 2021
%Y Cf. A080846 (essentially the same), A026138, A026232, A189641.
%Y Cf. A189628 (guide).
%K nonn,easy
%O 1
%A _Clark Kimberling_, Apr 24 2011