Left to Solve
Problems / MathOverflow (not formalized)

Mean number of subtractions in the Euclidean algorithm

Open, not yet stated in LeanMathOverflow (not formalized)Number Theorydifficulty55/100

Statement

Let n be a positive integer and let (a,b) be a randomly chosen pair of coprime positive integers such that a + b = n (meaning any such pair is equally likely to be chosen). What can be said about the mean number of subtractions required to act the euclidean algorithm on the pair (a,b), and how does the answer behave as n increases?

Note it’s the number of subtractions I need to know about, and not the average number of lines in the algorithm when conducted by division.

Posed by Peter Higgins · nt.number-theory

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-446283.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-446283.lean

import Mathlib

/-!
# Mean number of subtractions in the Euclidean algorithm

Source: https://mathoverflow.net/questions/446283
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_446283

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_446283