/- 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 import FormalConjectures.Wikipedia.LegendreConjecture

Erdős Problem 375

References:

    erdosproblems.com/375

    [ErGr80] Erdős, P. and Graham, R., Old and new problems and results in combinatorial number theory. Monographies de L'Enseignement Mathematique (1980).

    [RST75] Ramachandra, K. and Shorey, T. N. and Tijdeman, R., On Grimm's problem relating to factorisation of a block of consecutive integers. J. Reine Angew. Math. (1975), 109-124.

open Set Filter Topology Asymptoticsnamespace Erdos375

This is a proposition saying that for any n ≥ 1 and any k, if n + 1, ..., n + k are all composite, then there are distinct primes p₁, ... pₖ such that pᵢ ∣ n + i for all 1 ≤ i ≤ k.

def Erdos375Prop : Prop := n 1, k, ( i < k, ¬ (n + i + 1).Prime) p : Fin k , p.Injective i, (p i).Prime p i n + i + 1

Is Erdos375Prop true?

@[category research open, AMS 11] theorem erdos_375 : answer(sorry) Erdos375Prop := True Erdos375Prop All goals completed! 🐙

If Erdos375Prop is true, then (n + 1).nth Prime - n.nth Prime < (n.nth Prime) ^ (1 / 2 - c) for some c > 0.

@[category research solved, AMS 11] theorem erdos_375.variants.bounded_gap : Erdos375Prop c > 0, ∀ᶠ n in atTop, (n + 1).nth Nat.Prime - n.nth Nat.Prime < (n.nth Nat.Prime : ) ^ (1 / (2 : ) - c) := Erdos375Prop c > 0, ∀ᶠ (n : ) in atTop, (Nat.nth Nat.Prime (n + 1)) - (Nat.nth Nat.Prime n) < (Nat.nth Nat.Prime n) ^ (1 / 2 - c) All goals completed! 🐙

In particular, if Erdos375Prop is true, then Legendre's conjecture is asymptotically true.

@[category research solved, AMS 11] theorem erdos_375.variants.legendre : Erdos375Prop (∀ᶠ n in atTop, p Set.Ioo (n ^ 2) ((n + 1) ^ 2), Nat.Prime p) := fun hp => LegendreConjecture.bounded_gap_legendre (erdos_375.variants.bounded_gap hp)

It is easy to see that for any n ≥ 1 and k ≤ 2, if n + 1, ..., n + k are all composite, then there are distinct primes p₁, ... pₖ such that pᵢ ∣ n + i for all 1 ≤ i ≤ k.

n:hn:n 1k:hk:2 2h: i < 2, ¬Nat.Prime (n + i + 1)p:Fin 2 hp: (i : Fin 2), Nat.Prime (p i) p i n + i + 1x:Fin 2y:Fin 2hxy:p x = p yhr:x yhq:x < yhy:y = x + 1False n:hn:n 1k:hk:2 2h: i < 2, ¬Nat.Prime (n + i + 1)p:Fin 2 hp: (i : Fin 2), Nat.Prime (p i) p i n + i + 1x:Fin 2y:Fin 2hxy:p x = p yhr:x yhq:x < yhy:y = x + 1this:p (x + 1) n + (x + 1) + 1 - (n + x + 1)False n:hn:n 1k:hk:2 2h: i < 2, ¬Nat.Prime (n + i + 1)p:Fin 2 hp: (i : Fin 2), Nat.Prime (p i) p i n + i + 1x:Fin 2y:Fin 2hxy:p x = p yhr:x yhq:x < yhy:y = x + 1this✝:p (x + 1) n + (x + 1) + 1 - (n + x + 1)this:Nat.Prime (p 1)False All goals completed! 🐙

There exists a constant c > 0 such that for all n, if k < c * (log n / (log (log n))) ^ 3 → (∀ i < k, ¬ (n + i + 1).Prime), then there are distinct primes p₁, ... pₖ such that pᵢ ∣ n + i for all 1 ≤ i ≤ k. This is proved in [RST75]. There is no need to only consider sufficiently large n because one can always take c small enough so that k < c * (log n / (log (log n))) ^ 3 implies that k = 0 until n is large.

@[category research solved, AMS 11] theorem erdos_375.variants.log : c > 0, n k : , k < c * (Real.log n / (Real.log (Real.log n))) ^ 3 ( i < k, ¬ (n + i + 1).Prime) p : Fin k , p.Injective i, (p i).Prime p i n + i + 1 := c > 0, (n k : ), k < c * (Real.log n / Real.log (Real.log n)) ^ 3 (∀ i < k, ¬Nat.Prime (n + i + 1)) p, Function.Injective p (i : Fin k), Nat.Prime (p i) p i n + i + 1 All goals completed! 🐙end Erdos375