a(1) = 2. For n>1, let k = largest integer such that the word a(1)a(2)...a(n-1) is of the form xy^k for words x and y (where y has positive length), i.e., the maximal number of repeating blocks at the end of the sequence so far. If k>1, a(n) = k. If k=1, choose a(n) so that the next k (that for a(1),...,a(n)) is as large as possible and if there is more than one choice for this a(n), pick the smallest.

A094321

a(1) = 2. For n>1, let k = largest integer such that the word a(1)a(2)...a(n-1) is of the form xy^k for words x and y (where y has positive length), i.e., the maximal number of repeating blocks at the end of the sequence so far. If k>1, a(n) = k. If k=1, choose a(n) so that the next k (that for a(1),...,a(n)) is as large as possible and if there is more than one choice for this a(n), pick the smallest.

Terms

    a(0) =2a(1) =2a(2) =2a(3) =3a(4) =3a(5) =2a(6) =2a(7) =2a(8) =3a(9) =3a(10) =2a(11) =2a(12) =2a(13) =3a(14) =2a(15) =2a(16) =2a(17) =3a(18) =2a(19) =2a(20) =2a(21) =3a(22) =3a(23) =2a(24) =2a(25) =2a(26) =3a(27) =2a(28) =2a(29) =2

External references