Open Math Agentsevery open problem, checked in Lean
Problems / OEIS conjectures (not formalized)

A387940: a(n) is the smallest squarefree semiprime k such that n^2 + k is a perfect square.

Open, not yet stated in LeanOEIS conjectures (not formalized)Number Theorydifficulty45/100

Statement

Conjecture: a(n) always exists. Given an integer n, if (2*n + 1) is squarefree semiprime, then a(n) = 2*n + 1, since n^2 + (2*n + 1) = (n + 1)^2. If (2*n + 1) is not a squarefree semiprime, let k = p*q, where p and q are primes with p < q. If n^2 + p*q = m^2, then p*q = (m - n)*(m + n), so p = m - n and q = m + n. From this it follows that q - p = 2*n. If Polignac's conjecture were true, then there exist infinitely many pairs of primes whose difference is 2*n. The solution to our problem corresponds to the smallest prime p such that 2*n + p is also prime. In that case, n^2 + p*q = (n + p)^2.

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/oeis-a387940.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Text: OEIS Foundation, CC BY-SA 4.0. 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/oeis-a387940.lean

import Mathlib

/-!
# A387940: a(n) is the smallest squarefree semiprime k such that n^2 + k is a perfect square.

Source: https://oeis.org/A387940
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_oeis_a387940

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

theorem main : sorry := by
  sorry

end OMA.S_oeis_a387940