OFFSET
1,2
LINKS
Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Aug 23 2023
STATUS
approved