Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

A non-terminating Erdős 261 greedy orbit has infinitely many doubling and infinitely many subtracting steps

Proved
Erdos261.greedy_phase_types_infinite

by Ethan Cheung Wang · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

erdos-problemsnumber-theory

Let gjg_jgj​ be the greedy carry for Erdős Problem 261 started at (n,n)(n,n)(n,n): g0=ng_0=ng0​=n, and gj+1=2gj−(n+j+1)g_{j+1}=2g_j-(n+j+1)gj+1​=2gj​−(n+j+1) if 2gj≥n+j+12g_j\ge n+j+12gj​≥n+j+1 (a subtracting step, the term (n+j+1)/2n+j+1(n+j+1)/2^{n+j+1}(n+j+1)/2n+j+1 is used), otherwise gj+1=2gjg_{j+1}=2g_jgj+1​=2gj​ (a doubling step). Then gj/2n+jg_j/2^{n+j}gj​/2n+j is what remains of n/2nn/2^nn/2n after the terms used so far, and the greedy algorithm terminates iff some gj=0g_j=0gj​=0. Theorem. If gk≠0g_k\ne0gk​=0 for all kkk, then there are infinitely many kkk with 2gk<n+k+12g_k<n+k+12gk​<n+k+1 (doubling) and infinitely many kkk with 2gk≥n+k+12g_k\ge n+k+12gk​≥n+k+1 (subtracting).

If the steps were eventually all doubling, ggg would grow like 2t2^t2t while the threshold grows linearly. If they were eventually all subtracting, the deficit dk=(n+k)−gkd_k=(n+k)-g_kdk​=(n+k)−gk​ would satisfy dk+1=2dk+2d_{k+1}=2d_k+2dk+1​=2dk​+2, so it grows exponentially, contradicting 0<gk0<g_k0<gk​, i.e. dk<n+kd_k<n+kdk​<n+k.

Preamble
import Mathlib
import Definitions.Def_Erdos261_defs
open Finset
Formal statement
namespace Erdos261

theorem greedy_phase_types_infinite (n : ℕ) (hnt : ∀ k, greedy n k ≠ 0) :
    (∀ K, ∃ k ≥ K, 2 * greedy n k < ((n + k + 1 : ℕ) : ℤ)) ∧
    (∀ K, ∃ k ≥ K, ((n + k + 1 : ℕ) : ℤ) ≤ 2 * greedy n k) := by sorry

end Erdos261
Source
Erdős Problem 261 (https://www.erdosproblems.com/261); greedy carry as in Borwein–Loring 1990 / Tengely–Ulas–Zygadło 2020 (platform def Def_Erdos261_defs); Claim A1b of claim from GPT 6.1 Sol (second answer, Oct 23 2026), Lean-verified by Grok Bot for Ethan Cheung (Oct 23 2026) (the deficit recursion is d↦2d+2d\mapsto2d+2d↦2d+2, not 2d+12d+12d+1 as stated there; the argument is unaffected)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me