A362248 a(n) is the number of locations 1..n-1 which can reach i=n-1, where jumps from location i to i +- a(i) are permitted (within 1..n-1); a(1)=1. See example.
1, 1, 2, 3, 1, 5, 6, 7, 1, 1, 2, 11, 1, 13, 14, 15, 1, 1, 2, 3, 1, 5, 6, 23, 1, 1, 2, 27, 1, 29, 30, 31, 1, 1, 2, 3, 1, 5, 6, 7, 1, 1, 2, 11, 1, 13, 14, 47, 1, 1, 2, 3, 1, 5, 6, 55, 1, 1, 2, 59, 1, 61, 62, 63, 1, 1, 2, 3, 1, 5, 6, 7, 1, 1, 2, 11, 1, 13, 14, 15
Offset: 1
Keywords
Examples
a(6)=5 because there are 5 starting terms from which i=5 can be reached: 1, 1, 2, 3, 1 1->1->2---->1 We can see that i=1,2,3 and trivially 5 can reach i=5. i=4 can also reach i=5: 1, 1, 2, 3, 1 1<-------3 1->1->2---->1 This is a total of 5 locations, so a(6)=5.
Links
- Kevin Ryde, Table of n, a(n) for n = 1..10000
- Kevin Ryde, C Code
Programs
-
C
/* See links */
Extensions
a(24) onwards from Kevin Ryde, May 17 2023
Comments