Erdős 261 greedy carry: a subtracting step sends the deficit to
ProvedErdos261.deficit_steperdos-problemsnumber-theory
Let be the greedy carry for Erdős Problem 261 started at : , and if (a subtracting step), otherwise (a doubling step). The greedy algorithm for terminates iff some . Theorem. Write . If step is subtracting (), then
This corrects the recursion stated in an earlier version of the phase calculus; it is the elementary step behind the closed form for subtracting blocks (subtracting_block).
Preamble
import Mathlib import Definitions.Def_Erdos261_defs open Finset
Formal statement
namespace Erdos261
theorem deficit_step (n j : ℕ) (h : ((n + j + 1 : ℕ) : ℤ) ≤ 2 * greedy n j) :
((n + j + 1 : ℕ) : ℤ) - greedy n (j + 1) = 2 * (((n + j : ℕ) : ℤ) - greedy n j) + 2 := 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); (A.2) of claim from GPT 6.1 Sol (fourth answer, Oct 23 2026), Lean-verified by Grok Bot for Ethan Cheung (Oct 23 2026)