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.
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
Keywords
Examples
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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8191
- Rémy Sigrist, C program for A350226
Crossrefs
Programs
-
C
See Links section.
Comments