login
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).
2

%I #17 Dec 19 2024 11:45:36

%S 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,

%T 14,14,14,14,14,14,14,14,14,21,21,21,21,21,21,21,21,21,21,21,24,24,24,

%U 21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22

%N 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).

%C The diameter of the sequence's digraph is the largest eccentricity of any vertex (location) in the graph. The eccentricity of a location i means the largest number of jumps in the shortest path from location i to any other location.

%H Kevin Ryde, <a href="/A367129/b367129.txt">Table of n, a(n) for n = 1..10000</a>

%H Kevin Ryde, <a href="/A367128/a367128.c.txt">C Code</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Distance_(graph_theory)">Distance (graph theory)</a>

%e 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:

%e i = 1 2 3 4

%e a(i) = 1, 1, 1, 2

%e 1->1->1->2

%e 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.

%o (C) /* See links */

%Y Cf. A367128, A365576, A364392, A362248, A360744, A360745, A360746.

%K nonn

%O 1,4

%A _Neal Gersh Tolunsky_, Nov 05 2023