%I #44 Oct 04 2019 09:12:32
%S 0,1,2,0,0,0,1,0,1,0,1,2,0,0,1,2,0,0,1,2,0,0,0,1,0,1,2,0,0,0,1,0,1,2,
%T 0,0,0,1,0,1,0,1,2,0,0,1,2,0,0,0,1,0,1,0,1,2,0,0,1,2,0,0,0,1,0,1,0,1,
%U 2,0,0,1,2,0,0,1,2,0,0,0,1,0,1,2,0,0,0,1,0,1,0,1,2,0,0,1,2,0,0,1
%N Unique fixed point of the morphism 0 -> 01, 1 -> 20, 2 -> 0.
%C From _Clark Kimberling_, May 21 2017: (Start)
%C Let u be the sequence of positions of 0, and likewise, v for 1 and w for 2. Let U, V, W be the limits of u(n)/n, v(n)/n, w(n)/n, respectively. Then 1/U + 1/V + 1/W = 1, where
%C U = 1.8392867552141611325518525646532866...,
%C V = U^2 = 3.3829757679062374941227085364...,
%C W = U^3 = 6.2222625231203986266745611011....
%C If n >=2, then u(n) - u(n-1) is in {1,2,3}, v(n) - v(n-1) is in {2,4,5}, and w(n) - w(n-1) is in {4,7,9}. (u = A277736, v = A277737, w = A277738). (End)
%C Although I believe the assertions in Kimberling's comment above to be correct, these results are quite tricky to prove, and unless a formal proof is supplied at present these assertions must be regarded as conjectures. - _N. J. A. Sloane_, Aug 20 2018
%C From _Michel Dekking_, Oct 03 2019: (Start)
%C Here is a proof of Clark Kimberling's conjectures (and more).
%C The incidence matrix of the defining morphism
%C sigma: 0 -> 01, 1 -> 20, 2 -> 0
%C is the same as the incidence matrix of the tribonacci morphism
%C 0 -> 01, 1 -> 02, 2 -> 0
%C (see A080843 and/or A092782).
%C This implies that the frequencies f0, f1 and f2 of the letters 0,1, and 2 in (a(n)) are the same as the corresponding frequencies in the tribonacci word, which are 1/t, 1/t^2 and 1/t^3 (see, e.g., A092782).
%C Since U = 1/f0, V = 1/f1, and W = 1/f2, we conclude that
%C U = t = A058265, V = t^2 = A276800 and W = t^3 = A276801.
%C The statements on the difference sequences u, v, and w of the positions of 0,1, and 2 are easily verified by applying sigma to the return words of these three letters.
%C Here the return words of an arbitrary word w in a sequence x are all the words occurring in x with prefix w that do not have other occurrences of w in them.
%C The return words of 0 are 0, 01, and 012, which indeed have length 1, 2
%C and 3. Since
%C sigma(0) = 01, sigma(1) = 0120, and sigma(012) = 01200,
%C one sees that u is the unique fixed point of the morphism
%C 1 -> 2, 2-> 31, 3 ->311.
%C With a little more work, passing to sigma^2, and rotating, one can show that v is the unique fixed point of the morphism
%C 2->52, 4->5224, 5->52244 .
%C Similarly, w is the unique fixed point of the morphism
%C 4->94, 7->9447, 9->94477.
%C Interestingly, the three morphisms having u,v, and w as fixed point are essentially the same morphism (were we replaced sigma by sigma^2) with standard form
%C 1->12, 2->1223, 3->12233.
%C (End)
%C The kind of phenomenon observed at the end of the previous comment holds in a very strong way for the tribonacci word. See Theorem 5.1. in the paper by Huang and Wen. - _Michel Dekking_, Oct 04 2019
%H N. J. A. Sloane, <a href="/A277735/b277735.txt">Table of n, a(n) for n = 1..20000</a>
%H Y.-K. Huang, Z.-Y. Wen, <a href="https://doi.org/10.1016/S0252-9602(15)30086-2">Kernel words and gap sequence of the Tribonacci sequence</a>, Acta Mathematica Scientia (Series B). 36.1 (2016) 173-194.
%H Victor F. Sirvent, <a href="https://doi.org/10.1016/S0893-9659(98)00121-9">Semigroups and the self-similar structure of the flipped tribonacci substitution</a>, Applied Math. Letters, 12 (1999), 25-29.
%H Victor F. Sirvent, <a href="https://doi.org/10.36045/bbms/1103055617">The common dynamics of the Tribonacci substitutions</a>, Bulletin of the Belgian Mathematical Society-Simon Stevin 7.4 (2000): 571-582.
%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>
%p with(ListTools);
%p T:=proc(S) Flatten(subs( {0=[0,1], 1=[2,0], 2=[0]}, S)); end;
%p S:=[0];
%p for n from 1 to 10 do S:=T(S); od:
%p S;
%t s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {2, 0}, 2 -> 0}] &, {0}, 10] (* A277735 *)
%t Flatten[Position[s, 0]] (* A277736 *)
%t Flatten[Position[s, 1]] (* A277737 *)
%t Flatten[Position[s, 2]] (* A277738 *)
%t (* _Clark Kimberling_, May 21 2017 *)
%Y Cf. A277736, A277737, A277738.
%Y Equals A100619(n)-1.
%K nonn
%O 1,3
%A _N. J. A. Sloane_, Nov 07 2016
%E Name clarified by _Michel Dekking_, Oct 03 2019