A367129 a(1)=a(2)=1; thereafter a(n) is the diameter of the sequence's digraph, where jumps from location i to i+-a(i) are permitted (within 1..n-1).
1, 1, 1, 2, 3, 3, 4, 4, 4, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 24, 24, 24, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22
Offset: 1
Keywords
Examples
a(5)=3 because i=1 has the largest eccentricity of any location. i=1 takes 3 jumps to reach i=4 in the shortest path: i = 1 2 3 4 a(i) = 1, 1, 1, 2 1->1->1->2 Every other location has eccentricity 2, which makes 3 the largest eccentricity and thus the diameter of the sequence's digraph, so a(5)=3.
Links
- Kevin Ryde, Table of n, a(n) for n = 1..10000
- Kevin Ryde, C Code
- Wikipedia, Distance (graph theory)
Programs
-
C
/* See links */
Comments