A154752: Least prime p (or 0) such that n = p + T, where T is a triangular number (A000217), or -1 if there is no such representation.
Statement
Zhi-Wei Sun conjectures that only n=216 has no such representation. It appears that n = 2, 7, 61 and 211 are the only numbers for which the triangular number 0 is required in the representation (see A065397). When n is a triangular number, then a(n)=0. Sequence A132399 gives the number of representations of n as p+T. As n becomes larger, the largest prime required to verify the conjecture increases slowly. For example, for n<=10^3, the largest prime required is 953; for n<=10^6 it is 373361; for n<=10^9 it is only 36455351. Using primes less than 10^9, all n<243277591560 have been verified.
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-a154752.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-a154752.lean
import Mathlib /-! # A154752: Least prime p (or 0) such that n = p + T, where T is a triangular number (A000217), or -1 if there is no such representation. Source: https://oeis.org/A154752 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_a154752 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_oeis_a154752