Left to Solve
Problems / MathOverflow (not formalized)

Algorithm for summing certain sums involving the floor function

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

Statement

I managed to find an efficient algorithm (polynomial time in , and ) for the following sum:

where are relatively prime positive integers. When it's fairly easy to get a simple closed form, and this is also well-known. The details of the general algorithm can be found here Link. It is a very nice algorithm that resembles the standard GCD algorithm somewhat.

I'm trying to generalize this algorithm to sums of the following form: where , and are non-negative integers. Does anyone have any good ideas for this? The algorithm doesn't have to be polynomial in and , and algorithms for small values of and would also be interesting (such as ). Obviously, is not interesting.

Posed by John Huddlesfield · nt.number-theory, co.combinatorics

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-51132.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-51132.lean

import Mathlib

/-!
# Algorithm for summing certain sums involving the floor function

Source: https://mathoverflow.net/questions/51132
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_51132

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

theorem main : sorry := by
  sorry

end OMA.S_mo_51132