login
Trajectory of 1 under the morphism 1 -> {1,1,2,1}, 2 -> {2}.
4

%I #24 Jan 12 2022 09:25:46

%S 1,1,2,1,1,1,2,1,2,1,1,2,1,1,1,2,1,1,1,2,1,2,1,1,2,1,2,1,1,2,1,1,1,2,

%T 1,2,1,1,2,1,1,1,2,1,1,1,2,1,2,1,1,2,1,1,1,2,1,1,1,2,1,2,1,1,2,1,2,1,

%U 1,2,1,1,1,2,1,2,1,1,2,1,2,1,1,2,1,1,1,2,1,2,1,1,2,1,1,1,2,1,1

%N Trajectory of 1 under the morphism 1 -> {1,1,2,1}, 2 -> {2}.

%C It can be shown that this is lim_{t -> oo} S_t, where S_0 = 1, S_{t+1} = S_t S_t 2 S_t.

%C Suggested by A131989: a(n) = length of n-th run of 1's in A131989.

%C For a proof of this see the Comments of A131989. - _Michel Dekking_, Oct 19 2019

%H Seiichi Manyama, <a href="/A133162/b133162.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

%F Denote the sequence by a(1), a(2), ...

%F Block t, that is, S_t, extends from n=1 through n=(3^(t+1)-1)/2.

%F Given n, to find a(n): first find t from

%F p = (3^t-1)/2 < n <= (3^(t+1)-1)/2.

%F Then if n=3^t, a(n) = 2. Otherwise, a(n) = a(n'), where

%F n' = n-p if n<3^t, otherwise n' = n-2p-1.

%t Nest[Function[l, {Flatten[(l /. {1 -> {1,1,2,1}, 2 -> {2} })] }], {1}, 5] (* _Georg Fischer_, Jul 19 2019 *)

%Y Cf. A049320, A131989, A317962.

%K nonn,easy

%O 1,3

%A _N. J. A. Sloane_, Oct 09 2007, Oct 10 2007