Recurrence for the hyperbinary count
ProvedCalkinWilf.hyperbinaryCount_recurrencecombinatoricsnumber-theory
Let be the number of hyperbinary representations of : ways to write as a sum of powers of , each power used at most twice. Then
These recurrences determine . They match the rule that builds the Calkin–Wilf tree, where the children of are and .
Preamble
import Mathlib import Definitions.Def_CalkinWilf_hyperbinaryCount
Formal statement
namespace CalkinWilf
/-- Calkin–Wilf, p.362: `b(0) = 1`, `b(2n+1) = b(n)` and `b(2n+2) = b(n) + b(n+1)`. -/
theorem hyperbinaryCount_recurrence :
hyperbinaryCount 0 = 1 ∧
∀ n : ℕ, hyperbinaryCount (2 * n + 1) = hyperbinaryCount n ∧
hyperbinaryCount (2 * n + 2) = hyperbinaryCount n + hyperbinaryCount (n + 1) := by
sorry
end CalkinWilf
Source
Calkin–Wilf, Recounting the Rationals, Amer. Math. Monthly 107 (2000), no. 4, 360–363, https://www.jstor.org/stable/2589182, p. 362