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 A131989 #20 Oct 23 2019 06:56:56 %S A131989 2,3,1,2,3,3,1,2,1,2,3,1,2,3,3,1,2,3,3,1,2,1,2,3,1,2,1,2,3,1,2,3,3,1, %T A131989 2,1,2,3,1,2,3,3,1,2,3,3,1,2,1,2,3,1,2,3,3,1,2,3,3,1,2,1,2,3,1,2,1,2, %U A131989 3,1,2,3,3,1,2,1,2,3,1,2,1,2,3,1,2,3,3,1,2,1,2,3,1,2,3,3,1,2,3 %N A131989 Start with the symbol **|* and for each iteration replace * with **|*. This sequence is the number of *'s between each dash. %C A131989 If the leading a(1)=2 is dropped, at least the next 90 terms coincide with those of A026181. - _R. J. Mathar_, Jun 13 2008 %C A131989 From _Michel Dekking_, Oct 19 2019: (Start) %C A131989 Coding * by 1 and | by 2, the procedure is the same as performing the substitution sigma: 1 -> 1121, 2 -> 2. The return words of this morphism are 12, 112 and 1112. Under sigma these words transform as %C A131989 12->11212, 112-> 112111212, 1112->1121112111212. %C A131989 Coding the return words by their length minus one, the corresponding derivated morphism is %C A131989 1-> 21, 2-> 231, 3-> 2331. %C A131989 (a(n)) is the unique fixed point of this morphism. %C A131989 (End) %C A131989 a(n) = x(n+1), where x is the primitive Chacon sequence A049321 on the alphabet {3,1,2} instead of {0,1,2}. This follows from the fact that %C A131989 sigma: 0->0012, 1->12, 2->012 and tau: 0->2001, 1->21, 2->201 are conjugated morphisms: tau(j) = 2 sigma(j) 2^{-1} for j=0,1,2. - _Michel Dekking_, Oct 23 2019 %F A131989 Comments from _N. J. A. Sloane_, Oct 10 2007: (Start) %F A131989 The following is a simple recursive method to generate this sequence. The sequence is lim_{ t -> oo } S_t, where S_0 = 1+, and S_{t+1} is obtained from the concatenation S_t S_t S_t by replacing the first + by the sum of the two numbers adjacent to it and deleting the second +. %F A131989 Thus we have: %F A131989 S_0 = 1+, %F A131989 S_1 = 1+1+1+ -> 21+, %F A131989 S_2 = 21+21+21+ -> 23121+, %F A131989 S_3 = 23121+23121+23121+ -> 23123312123121+, %F A131989 S_4 = 23123312123121+23123312123121+23123312123121+ -> 23123312123123312331212312123123312123121+, etc. %F A131989 Denote the sequence by a(1), a(2), ... %F A131989 Block t, that is, S_t omitting the final 1+, extends from n=1 through n=(3^t-1)/2. %F A131989 Given n, to find a(n): first find t from %F A131989 p = (3^(t-1)-1)/2 < n <= (3^t-1)/2. %F A131989 Assume t >= 2. Then if n=(3^(t-1)+1)/2, a(n) = 3 and if n=3^(t-1), a(n) = 1. %F A131989 Otherwise, a(n) = a(n'), where %F A131989 n' = n-p if n<3^(t-1), otherwise n' = n-3^(t-1). (End) %e A131989 The symbol through a few iterations: **|*, **|***|*|**|*, **|***|*|**|***|***|*|**|*|**|***|*|**|*, etc. %Y A131989 a(n) = length of n-th run of 1's in A133162. - _N. J. A. Sloane_, Oct 09 2007 %K A131989 easy,nonn %O A131989 1,1 %A A131989 Alex H. Bishop (AlexanderBishop(AT)stmarksschool.org), Oct 07 2007 %E A131989 More terms from _N. J. A. Sloane_, Oct 10 2007