/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ import FormalConjecturesUtil

Erdős Problem 445

References:

open Filter namespace Erdos445

The property that there exist $a,b\in(n,n+p^c)$ such that $ab\equiv 1\pmod{p}$.

def Erdos445Prop (c : ) (p n : ) : Prop := a b : , n < a (a : ) < (n : ) + (p : ) ^ c n < b (b : ) < (n : ) + (p : ) ^ c a * b 1 [MOD p]

Is it true that, for any $c>1/2$, if $p$ is a sufficiently large prime then, for any $n\geq 0$, there exist $a,b\in(n,n+p^c)$ such that $ab\equiv 1\pmod{p}$?

This is discussed in this MathOverflow question [MathOverflow].

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_445 : answer(sorry) c : , c > 1 / 2 ∀ᶠ p : in atTop, p.Prime n : , Erdos445Prop c p n := True c > 1 / 2, ∀ᶠ (p : ) in atTop, Nat.Prime p (n : ), Erdos445Prop c p n All goals completed! 🐙

Heilbronn (unpublished) proved this for $c$ sufficiently close to $1$.

@[category research solved, AMS 11] theorem declaration uses 'sorry'erdos_445.variants.heilbronn : c₀ < 1, c : , c > c₀ ∀ᶠ p : in atTop, p.Prime n : , Erdos445Prop c p n := c₀ < 1, c > c₀, ∀ᶠ (p : ) in atTop, Nat.Prime p (n : ), Erdos445Prop c p n All goals completed! 🐙

Heath-Brown [He00] used Kloosterman sums to prove this for all $c>3/4$.

@[category research solved, AMS 11] theorem declaration uses 'sorry'erdos_445.variants.heath_brown : c : , c > 3 / 4 ∀ᶠ p : in atTop, p.Prime n : , Erdos445Prop c p n := c > 3 / 4, ∀ᶠ (p : ) in atTop, Nat.Prime p (n : ), Erdos445Prop c p n All goals completed! 🐙

Small example: for $p=5$, $c=1$, $n=0$, the pair $(2,3) \in (0,5)$ satisfies $2 \cdot 3 = 6 \equiv 1 \pmod{5}$.

@[category test, AMS 11] theorem erdos_445.test.small_example : Erdos445Prop 1 5 1 := Erdos445Prop 1 5 1 refine 2, 3, 1 < 2 All goals completed! 🐙, ?_, 1 < 3 All goals completed! 🐙, ?_, 2 * 3 1 [MOD 5] All goals completed! 🐙 all_goals 3 < 1 + 5; All goals completed! 🐙 end Erdos445