login
A338623
a(n) is the length of the longest block of consecutive terms appearing twice (possibly with overlap) among the first n terms of the Thue-Morse sequence (A010060).
2
0, 0, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
OFFSET
1,5
COMMENTS
This sequence is weakly increasing and unbounded (as A010060 is bounded).
LINKS
FORMULA
a(n) <= a(n+1) <= a(n) + 1.
a(A304588(n)) = n (and this is the first occurrence of n in the sequence).
EXAMPLE
For n = 8:
- the first 8 terms of A010060 are 0, 1, 1, 0, 1, 0, 0, 1,
- the blocks (0, 1) and (1, 0) are repeated, and there are no length-3 repeated block,
- so a(8) = 2.
PROG
(PARI) See Links section.
CROSSREFS
Cf. A010060, A304588, A338624 (Kolakoski variant).
Sequence in context: A309196 A243283 A243284 * A072613 A029551 A171482
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Nov 04 2020
STATUS
approved