A382559 a(n) is the length of the longest subsequence at indices in arithmetic progression ending at a(n-1) whose terms form an arithmetic progression in some order; a(1)=1.
1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 3, 2, 4, 3, 3, 3, 3, 4, 4, 3, 4, 3, 3, 5, 5, 4, 3, 3, 3, 5, 3, 4, 3, 4, 4, 3, 4, 3, 4, 3, 4, 4, 5, 3, 4, 3, 4, 4, 5, 3, 3, 3, 5, 4, 3, 5, 3, 4, 4, 4, 5, 3, 4, 4, 4, 3, 6, 4, 4, 4, 5, 3, 4, 6, 4, 4, 4, 4, 5, 4, 5, 3, 4, 6, 5, 4, 7
Offset: 1
Keywords
Examples
a(21) = 4: The subsequence at indices i = 2,8,14,20 (common difference 6) is {1,3,2,4} which can be rearranged to form the arithmetic progression {1,2,3,4}. We find that the longest such subsequence ending at a(20) has length 4, so a(21) = 4.
Links
- Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
- Neal Gersh Tolunsky, Graph of the ordinal transform of the first 10000 terms, with lines labeled by corresponding values of this sequence.
Comments