OFFSET
1,3
COMMENTS
It appears that A085262 gives the distinct values of this sequence (except for the initial zero).
The sequence is nondecreasing.
LINKS
Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
EXAMPLE
a(8)=7 because 7 is the largest index that cannot be expressed as the sum a(i)+-i for any i < n. 4 also cannot be expressed in this way, but it is smaller than 7.
Another way to see this is to consider each index i as a location from which one can jump a(i) terms forward or backward. For a(8)=7, we find the largest index which cannot be reached in this way (a smaller index being i=4):
0, 1, 2, 2, 4, 4, 4
0<-1
0, 1, 2, 2, 4, 4, 4
1<----2
0, 1, 2, 2, 4, 4, 4
1->2<----------4
0, 1, 2, 2, 4, 4, 4
?
0, 1, 2, 2, 4, 4, 4
2---->4
0, 1, 2, 2, 4, 4, 4
2---->4
0, 1, 2, 2, 4, 4, 4
?
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Nov 02 2023
STATUS
approved