A131989 Start with the symbol **|* and for each iteration replace * with **|*. This sequence is the number of *'s between each dash.
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, 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, 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
Offset: 1
Examples
The symbol through a few iterations: **|*, **|***|*|**|*, **|***|*|**|***|***|*|**|*|**|***|*|**|*, etc.
Crossrefs
a(n) = length of n-th run of 1's in A133162. - N. J. A. Sloane, Oct 09 2007
Formula
Comments from N. J. A. Sloane, Oct 10 2007: (Start)
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 +.
Thus we have:
S_0 = 1+,
S_1 = 1+1+1+ -> 21+,
S_2 = 21+21+21+ -> 23121+,
S_3 = 23121+23121+23121+ -> 23123312123121+,
S_4 = 23123312123121+23123312123121+23123312123121+ -> 23123312123123312331212312123123312123121+, etc.
Denote the sequence by a(1), a(2), ...
Block t, that is, S_t omitting the final 1+, extends from n=1 through n=(3^t-1)/2.
Given n, to find a(n): first find t from
p = (3^(t-1)-1)/2 < n <= (3^t-1)/2.
Assume t >= 2. Then if n=(3^(t-1)+1)/2, a(n) = 3 and if n=3^(t-1), a(n) = 1.
Otherwise, a(n) = a(n'), where
n' = n-p if n<3^(t-1), otherwise n' = n-3^(t-1). (End)
Extensions
More terms from N. J. A. Sloane, Oct 10 2007
Comments