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).
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
Keywords
Examples
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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..8192
- Rémy Sigrist, PARI program for A338623
Programs
-
PARI
See Links section.
Formula
a(n) <= a(n+1) <= a(n) + 1.
a(A304588(n)) = n (and this is the first occurrence of n in the sequence).
Comments