This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A287107 #18 Sep 23 2019 06:15:14 %S A287107 2,7,11,14,18,23,26,30,35,39,44,47,51,56,60,63,67,72,76,81,84,88,93, %T A287107 97,100,104,109,112,116,121,125,128,132,137,141,146,149,153,158,162, %U A287107 165,169,174,177,181,186,190,195,198,202,207,211,214,218,223,226,230 %N A287107 Positions of 2 in A287104. %C A287107 From _Michel Dekking_, Sep 16 2019: (Start) %C A287107 Let sigma be the defining morphism of A287104: 0->10, 1->12, 2->0. %C A287107 Let u=201, v=2101, w=20101 be the return words of the word 2. %C A287107 Under sigma u, v, and w are mapped to sigma(201) = 01012, sigma(2101) = 0121012, sigma(20101) = 010121012. %C A287107 All three images have suffix 2. We can therefore move this suffix to the front of all three images, obtaining the fixed point (a(n+1)) = 20101... when iterating. This induces the morphism 3 -> 5, 4 -> 34, 5 -> 54 on the return words, coded by their lengths. %C A287107 Coding the symbols according to 3<->2, 4<->1, 5<->0, this leads to the morphism 2->0, 1->21, 0->01 on the alphabet {0,1,2}. This is exactly the morphism which has A287072 as unique fixed point. So the sequence d of first differences of (a(n)) equals A287072 with the coding above. This gives the formula below. %C A287107 (End) %H A287107 Clark Kimberling, <a href="/A287107/b287107.txt">Table of n, a(n) for n = 1..10000</a> %F A287107 a(n) = 2 + Sum_{k=1..n-1} d(k), where d(k)=5 if A287072(k)=0, d(k)=4 if A287072(k)=1, and d(k)=3 if A287072(k)=2. - _Michel Dekking_, Sep 16 2019 %t A287107 s = Nest[Flatten[# /. {0 -> {1, 0}, 1 -> {1, 2}, 2 -> 0}] &, {0}, 10] (* A287104 *) %t A287107 Flatten[Position[s, 0]] (* A287105 *) %t A287107 Flatten[Position[s, 1]] (* A287106 *) %t A287107 Flatten[Position[s, 2]] (* A287107 *) %Y A287107 Cf. A287104, A287105, A287106. %K A287107 nonn,easy %O A287107 1,1 %A A287107 _Clark Kimberling_, May 21 2017