Left to Solve
Problems / MathOverflow (not formalized)

Iterative Prime-Generating Algorithm (foolproof): $p_{n+1} = \min \left\{ k > p_n \mid (p_n!)^k + (k!)^{p_n} \not\equiv 0 \pmod{k} \right\}$

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

Statement

Let be a prime.

,

Compactly, the algorithm can be written as:

Here are the primes generated using this algorithm, starting from :

$$\begin{array}{|c|c|} \hline p_n & k & (p_n!)^{k} + (k!)^{p_n} \pmod{k} & k=p_{n+1}?\\ \hline 2 & 3 & 2\neq0 & \text{Yes, } 3=p_2\\\hline 3 & 4 & 0 & \text{No}\\\hline 3 & 5 & 1\neq0 & \text{Yes, } 5=p_3\\\hline 5 & 6 & 0 & \text{No}\\\hline 5 & 7 & 1\neq0 & \text{Yes, } 7=p_4\\\hline 7 & 8 & 0 & \text{No}\\\hline 7 & 9 & 0 & \text{No}\\\hline 7 & 10 & 0 & \text{No}\\\hline 7 & 11 & 2\neq0 & \text{Yes, } 11=p_5\\\hline 11 & 12 & 0 & \text{No}\\\hline 11 & 13 & 1\neq0 & \text{Yes, } 13=p_6\\\hline 13 & 14 & 0 & \text{No}\\\hline 13 & 15 & 0 & \text{No}\\\hline 13 & 16 & 0 & \text{No}\\\hline 13 & 17 & 3\neq0 & \text{Yes, } 17=p_7\\\hline 17 & 18 & 0 & \text{No}\\\hline 17 & 19 & 1\neq0 & \text{Yes, } 19=p_8\\\hline 19 & 20 & 0 & \text{No}\\\hline 19 & 21 & 0 …

Posed by Dev Sharma · nt.number-theory, prime-numbers, modular-forms

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

import Mathlib

/-!
# Iterative Prime-Generating Algorithm (foolproof): $p_{n+1} = \min \left\{ k > p_n \mid (p_n!)^k + (k!)^{p_n} \not\equiv 0 \pmod{k} \right\}$

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

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

theorem main : sorry := by
  sorry

end OMA.S_mo_486288