Pointwise order of generalized Hofstadter functions G, H and beyond
Abstract
Hofstadter's G function is recursively defined via G(0)=0 and then G(n)=n-G(G(n-1)). Following Hofstadter, we vary the number k of nested recursive calls in this equation and obtain a family of functions (F\k). Here we establish that this family is ordered pointwise: for all k and n, we have F\k(n) F\k+1(n). To achieve this, we make a detour via infinite morphic words generalizing the Fibonacci word. We prove various properties of these words, concerning the lengths of substituted prefixes of these words and the number of occurrences of specific letters in these prefixes. We also relate the limits of 1nF\k(n) to the frequencies of letters in the considered words. We provide a certified formalization of all these results in the Rocq proof assistant.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.