%I #14 Nov 01 2018 18:19:17
%S 1,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,7,2,
%T 3,2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,8,2,3,2,
%U 4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,7,2,3,2,4,2,3,2,5
%N Sequence is S(infinity) where S(1)={1,2} and S(n)=S(n-1)S'(n-1), where S'(k) is obtained from S(k) by replacing the single 1 with the least integer not occurring in S(k).
%H Antti Karttunen, <a href="/A089080/b089080.txt">Table of n, a(n) for n = 1..16384</a>
%F Sum_{k=1..n} a(k) = 3*n+O(log(n)) ( Sum_{k=1..n} a(k) < 3*n )
%e S(1)={1,2} then S'(1)={3,2} and sequence begins 1,2,3,2
%o (PARI)
%o A085058(n) = (valuation(n+1, 2)+2);
%o A089080(n) = if(1==n,n,A085058(n-2)); \\ _Antti Karttunen_, Nov 01 2018
%Y Essentially the same as A085058 (with prepended 1 and different indexing).
%K nonn
%O 1,2
%A _Benoit Cloitre_, Dec 04 2003