OFFSET
1,3
COMMENTS
A location can be visited no more than once in a single path.
LINKS
Kevin Ryde, Table of n, a(n) for n = 1..246
Kevin Ryde, C Code
EXAMPLE
a(9)=6 because there are 6 locations which can be visited last (as a dead end) among i=1..8. The 6 locations are i=1,2,3,5,7,8. The following shows a path in which the last location is i=5, beginning at location s=8:
1 2 3 4 5 6 7 8 location number i
1,1,2,3,3,3,3,4 a(i)
1<----3<------4
1>1>2-->3
From i=5, the only jumps are back to i=1 or forward to i=8, both of which were already visited, so i=5 is one possible dead end term. Here is a path illustrating how i=7 can be a dead end term. We begin at s=4.
1 2 3 4 5 6 7 8 location number i
1,1,2,3,3,3,3,4 a(i)
3---->3
From i=7, we can only jump back to i=4, which was already visited, so i=7 is a dead end term. There are 4 other locations which can be last (or dead ends), for a total of 6 such locations, so a(9)=6.
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Aug 11 2023
EXTENSIONS
More terms from Kevin Ryde, Aug 26 2023
STATUS
approved