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”).

A307095
Let K_n = prefix of length n of Kolakoski sequence A000002; a(n) is the length of the longest palindromic suffix of K_n.
2
1, 1, 2, 4, 2, 4, 3, 3, 2, 4, 6, 5, 7, 2, 4, 3, 5, 7, 9, 11, 13, 3, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 6, 3, 2, 4, 6, 5, 7, 2, 4, 3, 3, 2, 4, 6, 8, 10, 12, 6, 5, 7, 2, 4, 3, 5, 7, 9, 11, 13, 3, 2, 4, 6, 5, 7, 2, 4, 3, 5, 7, 6, 3, 2, 4, 6, 8, 10, 12, 2, 4
OFFSET
1,3
LINKS
FORMULA
a(n+1) <= a(n) + 2.
EXAMPLE
The first terms, alongside K_n with longest palindromic suffix in parentheses, are:
n a(n) K_n
-- ---- ------------------
1 1 (1)
2 1 1(2)
3 2 1(22)
4 4 (1221)
5 2 122(11)
6 4 12(2112)
7 3 1221(121)
8 3 12211(212)
9 2 1221121(22)
10 4 122112(1221)
11 6 12211(212212)
12 5 1221121(22122)
13 7 122112(1221221)
14 2 122112122122(11)
15 4 12211212212(2112)
16 3 1221121221221(121)
PROG
(PARI) See Links section.
CROSSREFS
See A220080 for a similar sequence.
Cf. A000002.
Sequence in context: A280638 A333725 A163894 * A032059 A074075 A184186
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 04 2019
STATUS
approved