login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A365159
a(n)=n for n<=3, and thereafter, a(n) is the number of locations 1..n-1 which cannot be reached starting from i=n-1, where jumps from location i to i +- a(i) are permitted (within 1..n-1). See example.
1
1, 2, 3, 2, 2, 3, 4, 4, 3, 6, 4, 6, 8, 5, 9, 10, 11, 12, 13, 13, 11, 11, 13, 13, 15, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 26, 26, 18, 26, 29, 20, 23, 24, 25, 26, 27, 28, 29, 29, 28, 31, 29, 28, 29, 30, 31, 32, 33, 34, 34, 38, 27, 39, 40, 41, 42, 42
OFFSET
1,2
LINKS
EXAMPLE
a(9)=3 because there are 3 locations that cannot be reached starting from i=n-1=8, where a(8)=4. We start by finding the locations that can be reached (each line shows the next unvisited location(s) we can reach from the term(s) in the previous iteration):
1, 2, 3, 2, 2, 3, 4, 4
2<----------4
1, 2, 3, 2, 2, 3, 4, 4
2<----2---->3
1, 2, 3, 2, 2, 3, 4, 4
3<-------3
We visited 5 locations (i = 2, 3, 4, 6, and 8) and can visit no more:
1, 2, 3, 2, 2, 3, 4, 4
2 3 2 3 4
This leaves a total of 3 locations that could not be reached (i = 1, 5, and 7) from i=8, so a(9)=3.
CROSSREFS
Cf. A360746.
Sequence in context: A303540 A137266 A062948 * A358639 A358640 A096258
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Aug 23 2023
STATUS
approved