OFFSET
1,8
COMMENTS
In other words, take the longest arithmetic progression at indices with common difference k ending at a(n-1) and call that length j. a(n) is the sum of each j-2 that corresponds to a distinct common difference k. This means that an arithmetic progression of length 3 is worth 1 point, length 4 is worth 2 points, and so on.
LINKS
Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
EXAMPLE
To find a(10), we see that there are 4 arithmetic progressions ending in a(9) = 0. These occur at indices i = 5,7,9; i = 3,5,7,9; i = 1,3,5,7,9; and i = 1,5,9. So a(10) = 4.
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, May 27 2025
EXTENSIONS
a(32)-a(86) from Pontus von Brömssen, May 30 2025
STATUS
approved
