login
A350226
a(n) is the length of the longest sequence of distinct numbers in arithmetic progression in the interval 0..n, ending with n and where the Thue-Morse sequence (A010060) is constant.
3
1, 1, 2, 2, 2, 2, 3, 3, 2, 4, 3, 2, 5, 3, 3, 6, 2, 3, 7, 4, 5, 3, 4, 3, 5, 5, 4, 4, 6, 3, 6, 7, 2, 4, 3, 5, 7, 7, 4, 6, 5, 5, 6, 3, 5, 6, 3, 6, 5, 7, 7, 5, 5, 4, 7, 4, 8, 6, 4, 4, 6, 6, 7, 8, 2, 3, 8, 5, 6, 3, 5, 5, 9, 7, 7, 7, 6, 4, 6, 7, 5, 5, 8, 5, 6, 6, 4
OFFSET
0,3
COMMENTS
In other words, a(n) is the greatest k > 0 such that A010060(n) = A010060(n - i*d) for i = 0..k-1 and some d > 0 (see A350285 for the least such d).
This sequence is unbounded (this is a consequence of Van der Waerden's theorem).
LINKS
EXAMPLE
For n = 12:
- the first 13 terms of A010060 are:
0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0
^ ^ ^ ^ ^
- A010060(0) = A010060(3) = A010060(6) = A010060(9) = A010060(12),
- and there is no longer sequence of distinct numbers <= 12 in arithmetic progression ending in 12 with this property,
- so a(12) = 5.
PROG
(C) See Links section.
CROSSREFS
Cf. A005346, A010060, A342818, A342827, A350235 (records), A350285 (least first differences).
Sequence in context: A143901 A115263 A055894 * A362136 A224713 A357427
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 20 2021
STATUS
approved