TOPICS
Search

Hofstadter H-Sequence


The Hofstadter H-sequence is defined by H(0)=0 and

 H(n)=n-H(H(H(n-1)))

for integers n>=1. The first few terms for n=1, 2, ... are 1, 1, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 13, 13, 14, ... (OEIS A005374).


Explore with Wolfram|Alpha

References

Hofstadter, D. R. Gödel, Escher, Bach: An Eternal Golden Braid. New York: Vintage Books, p. 137, 1989.Sloane, N. J. A. Sequence A005374/M0449 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Hofstadter H-Sequence

Cite this as:

Weisstein, Eric W. "Hofstadter H-Sequence." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/HofstadterH-Sequence.html

Subject classifications