OFFSET
0,5
COMMENTS
Let G be the directed graph with vertices labeled by the nonnegative integers and with an edge out of vertex n for each 0 in the binary representation of n (excluding leading zeros). If the 2^s term in n is 0, then the corresponding edge goes from vertex n to vertex n - 2^s.
Thus from vertex 12 = 1100_2 there are outgoing edges to vertex 11 = 12 - 1 and to vertex 10 = 12 - 2.
Then a(n) is the length of the longest sequence of edges starting at vertex n.
If we replace "0" by "1" in the definition, the analogous sequence is A000120. - Andrey Zabolotskiy, Oct 10 2021.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8191
Rémy Sigrist, C program for A347696
Ravi Vakil, On the Steenrod length of real projective spaces: finding longest chains in certain directed graphs, Discrete Mathematics 204 (1999) 415-425.
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 10 2021
EXTENSIONS
More terms from Rémy Sigrist, Oct 11 2021
STATUS
approved