login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A338626
a(n) is the least k such that the first k terms of the Kolakoski sequence (A000002) contain a length-n repeated block.
1
3, 6, 9, 10, 13, 15, 16, 28, 32, 33, 40, 41, 42, 43, 69, 70, 71, 72, 94, 95, 96, 97, 98, 99, 106, 107, 108, 109, 214, 215, 216, 217, 218, 219, 220, 221, 222, 297, 298, 299, 300, 301, 339, 340, 487, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730
OFFSET
1,1
COMMENTS
The sequence contains large runs of consecutive integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..9511 (terms < 3000000)
FORMULA
A338624(a(n)) = n.
EXAMPLE
For n = 2:
- the first 5 terms of Kolakoski sequence are: 1, 2, 2, 1, 1,
- they have no length-2 repeated block,
- the first 6 terms of Kolakoski sequence are: 1, 2, 2, 1, 1, 2,
- they have a length-2 repeated block: 1, 2,
- so a(2) = 6.
PROG
(PARI) See Links section.
(Perl) See Links section.
CROSSREFS
Cf. A000002, A304588 (Thue-Morse variant), A338624.
Sequence in context: A363950 A268328 A247575 * A289130 A376354 A188299
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Nov 04 2020
STATUS
approved