Runs of the Erdős 261 greedy carry have logarithmic length
ProvedErdos261.run_length_bounderdos-problemsnumber-theory
Let be the greedy carry for Erdős Problem 261 started at : , and if (a subtracting step), otherwise (a doubling step). Equivalently with , ; the greedy algorithm terminates iff some . Theorem. Let and . Then the steps are not all subtracting, and, if , they are not all doubling. Hence every maximal run of equal decisions starting at has length at most .
A doubling run gives , and a subtracting run gives , contradicting . (Close to Borwein–Loring 1990, Prop. 2 / Cor. 2 on strings of 0s and 1s.)
Preamble
import Mathlib import Definitions.Def_Erdos261_defs open Finset
Formal statement
namespace Erdos261
theorem run_length_bound (n j : ℕ) (hN : 2 ≤ n + j) :
(1 ≤ greedy n j →
¬ ∀ i < Nat.clog 2 (n + j) + 2, 2 * greedy n (j + i) < ((n + (j + i) + 1 : ℕ) : ℤ)) ∧
(¬ ∀ i < Nat.clog 2 (n + j) + 2, ((n + (j + i) + 1 : ℕ) : ℤ) ≤ 2 * greedy n (j + i)) := 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 A1 of claim from a GPT answer relayed by Ethan Cheung (third round, Oct 23 2026), Lean-verified by Grok Bot for Ethan Cheung (Oct 23 2026)