The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A154951 Found by taking the tree defined by the Hofstadter H-sequence (A005374), mirroring it left to right and relabeling the nodes so they increase left to right. a(n) is the parent node of node n in the tree so constructed. 1
 0, 1, 1, 2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9, 10, 10, 11, 12, 13, 13, 14, 15, 15, 16, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 24, 25, 25, 26, 27, 28, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 37, 38, 38, 39, 40, 41, 41, 42, 43, 43, 44, 44, 45, 46, 47, 47 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 REFERENCES D. R. Hofstadter, Goedel, Escher, Bach: an Eternal Golden Braid, Basic Books, 1999, p. 137. LINKS David Fifield Table of n, a(n) for n = 0..10000 PROG (Python) # Emulate a breadth-first traversal of the "flip" # of the tree defined by the Hofstadter H-sequence. def hflip_iter():     yield 0     yield 1     # Start on the first node of a left branch, parent node is 1.     queue = [(1, 1)]     n = 2     while True:         parent, state = queue.pop(0)         yield parent         if state == 0:             # Root node. Add the two children.             queue.append((n, 1))             queue.append((n, 0))         elif state == 1:             # First node on left branch. Add the second node.             queue.append((n, 2))         elif state == 2:             # Second node on left branch. Add a new root.             queue.append((n, 0))         n += 1 i = hflip_iter() for n in range(0, 10001):     print("%d %d" % (n, next(i))) CROSSREFS Cf. A005374, A123070. Sequence in context: A249569 A094500 A049473 * A095769 A080820 A274687 Adjacent sequences:  A154948 A154949 A154950 * A154952 A154953 A154954 KEYWORD nonn AUTHOR David Fifield, Jan 17 2009 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 7 17:52 EDT 2021. Contains 343652 sequences. (Running on oeis4.)