A257231: a(n) = n^2 mod p where p is the least prime greater than n.
Statement
Conjecture: a(n) is always a positive square, except for the terms 5, 7, 69, 42 and 17 given by n = 7, 23, 113, 114, and 115 respectively. It is easy to show that nonsquare terms are in [p, q) iff p and q are consecutive primes and q-p > sqrt(q). There are no gaps between consecutive primes greater than sqrt(q) for 127 < q < 4*10^18 (see Nicely's table of maximal prime gaps).
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-a257231.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-a257231.lean
import Mathlib /-! # A257231: a(n) = n^2 mod p where p is the least prime greater than n. Source: https://oeis.org/A257231 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_a257231 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_oeis_a257231