Table of Contents
Fetching ...

Generalized Hofstadter functions $G, H$ and beyond: numeration systems and discrepancy

Pierre Letouzey

TL;DR

The paper addresses generalized Hofstadter functions $F_k$ and their digital-expansion interpretations, seeking how closely $F_k(n)$ tracks linear forms $\alpha_k n$ with $\alpha_k$ the positive root of $X^k+X-1$. It develops Fibonacci-like $A_{k,p}$-based numeration systems, establishes Zeckendorf-type decompositions, and relates $F_k$ to shifts on these decompositions via the morphic-words framework, all while analyzing the associated polynomials $P_k$ and $Q_k$ and their zeros. The main results show finite discrepancy $\Delta_k$ iff $k\le4$ (with explicit bounds $\Delta_3\approx0.854$ and $\Delta_4\approx1.58$) and infinite discrepancy for $k\ge5$, including a logarithmic growth at $k=5$ and a sublinear growth $n^a$ for $k\ge6$; applications resolve longstanding OEIS conjectures for $F_3$ and $F_4$ and reveal a Rauzy-like fractal structure in the discrepancy. The work combines combinatorial constructions, algebraic-number theory, and Coq-based formal verification to illuminate the interplay between digital representations and Hofstadter-type dynamics, with implications for numeration systems and symbolic dynamics.

Abstract

Hofstadter's $G$ function is recursively defined via $G(0)=0$ and then $G(n)=n-G(G(n-1))$. Following Hofstadter, a family $(F_k)$ of similar functions is obtained by varying the number $k$ of nested recursive calls in this equation. We study here some Fibonacci-like sequences that are deeply connected with these functions $F_k$. In particular, the Zeckendorf theorem can be adapted to provide digital expansions via sums of terms of these sequences. On these digital expansions, the functions $F_k$ are acting as right shifts of the digits. These Fibonacci-like sequences can be expressed in terms of zeros of the polynomial $X^k{-}X^{k-1}{-}1$. Considering now the discrepancy of each function $F_k$, i.e., the maximal distance between $F_k$ and its linear equivalent, we retrieve the fact that this discrepancy is finite exactly when $k \le 4$. Thanks to that, we solve two twenty-year-old OEIS conjectures stating how close the functions $F_3$ and $F_4$ are from the integer parts of their linear equivalents. Moreover we establish that $F_k$ can coincide exactly with such an integer part only when $k\le 2$, while $F_k$ is almost additive exactly when $k \le 4$. Finally, a nice fractal shape a la Rauzy has been encountered when investigating the discrepancy of $F_3$. Almost all this article has been formalized and verified in the Coq/Rocq proof assistant.

Generalized Hofstadter functions $G, H$ and beyond: numeration systems and discrepancy

TL;DR

The paper addresses generalized Hofstadter functions and their digital-expansion interpretations, seeking how closely tracks linear forms with the positive root of . It develops Fibonacci-like -based numeration systems, establishes Zeckendorf-type decompositions, and relates to shifts on these decompositions via the morphic-words framework, all while analyzing the associated polynomials and and their zeros. The main results show finite discrepancy iff (with explicit bounds and ) and infinite discrepancy for , including a logarithmic growth at and a sublinear growth for ; applications resolve longstanding OEIS conjectures for and and reveal a Rauzy-like fractal structure in the discrepancy. The work combines combinatorial constructions, algebraic-number theory, and Coq-based formal verification to illuminate the interplay between digital representations and Hofstadter-type dynamics, with implications for numeration systems and symbolic dynamics.

Abstract

Hofstadter's function is recursively defined via and then . Following Hofstadter, a family of similar functions is obtained by varying the number of nested recursive calls in this equation. We study here some Fibonacci-like sequences that are deeply connected with these functions . In particular, the Zeckendorf theorem can be adapted to provide digital expansions via sums of terms of these sequences. On these digital expansions, the functions are acting as right shifts of the digits. These Fibonacci-like sequences can be expressed in terms of zeros of the polynomial . Considering now the discrepancy of each function , i.e., the maximal distance between and its linear equivalent, we retrieve the fact that this discrepancy is finite exactly when . Thanks to that, we solve two twenty-year-old OEIS conjectures stating how close the functions and are from the integer parts of their linear equivalents. Moreover we establish that can coincide exactly with such an integer part only when , while is almost additive exactly when . Finally, a nice fractal shape a la Rauzy has been encountered when investigating the discrepancy of . Almost all this article has been formalized and verified in the Coq/Rocq proof assistant.

Paper Structure

This paper contains 18 sections, 44 theorems, 96 equations, 4 figures.

Key Result

Proposition 2.1

For all $j,k \ge 1$, the function $F_k^j$ satisfies the following basic properties:

Figures (4)

  • Figure 1.1: Plotting $F_1,F_2,\ldots,F_5$.
  • Figure 3.1: Initial values of $A_{k,p}$.
  • Figure 8.1: A Jacobi-Perron fractal: displaying $(\delta_3(n),\delta_3(F_3(n)))$ for $n<10^4$.
  • Figure 9.1: Summary of results.

Theorems & Definitions (93)

  • Definition 1.1
  • Definition 1.2
  • Proposition 2.1
  • Proposition 2.2
  • Proposition 2.3
  • proof
  • Corollary 2.4
  • proof
  • Definition 3.1
  • Proposition 3.2
  • ...and 83 more