Title:Erdős Problem 1140 · variants.at_most_one_exception
Statement:The known such are . It is known that these are, with at most one exception, all such . An even such must be prime (take ), so . Theorem 4.1 of Epure and Gica [EpGi10] implies that the only such are , and their method, coupled with a result of Mollin and Williams [MoWi89], implies that the only such are , and at most one other exception.
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Cite as: | NS.00777 [math.NT] · NS.00777v1 for this version |
| Declaration: | Erdos1140.erdos_1140.variants.at_most_one_exception |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10; accepted critique: up to 100 |
| Statement hash: | cd5db5ca18cc22d865ff1bd6b1a065e393e19334ddbe655e92f87e3172d11087 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/ErdosProblems/1140.lean |
Formal statement
theorem erdos_1140.variants.at_most_one_exception :
({n : ℕ | Erdos1140Prop n} \ {2, 5, 7, 13, 31, 61, 181, 199}).SubsingletonShow the full Challenge.lean (84 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Erdős Problem 1140
*References:*
- [erdosproblems.com/1140](https://www.erdosproblems.com/1140)
- [EpGi10] Epure, M. and Gica, A., *Principal quadratic real fields in connection with some
additive problems*. Bull. Math. Soc. Sci. Math. Roumanie (N.S.) (2010), 251-259.
- [MoWi89] Mollin, R. A. and Williams, H. C., *Period four and real quadratic fields of class
number one*. Proc. Japan Acad. Ser. A Math. Sci. (1989), 89-93.
- [Va99] Various, *Some of Paul's favorite problems*. Booklet produced for the conference
"Paul Erdős and his mathematics", Budapest, July 1999 (1999).
-/
@[expose] public section
namespace Erdos1140
/-- $n \geq 1$ and $n - 2x^2$ is prime for all integers $x \geq 0$ with $2x^2 < n$. The value
$x = 0$ is allowed, so $n$ itself is prime, as in the known list. -/
def Erdos1140Prop (n : ℕ) : Prop :=
0 < n ∧ ∀ x : ℕ, 2 * x ^ 2 < n → (n - 2 * x ^ 2).Prime
instance (n : ℕ) : Decidable (Erdos1140Prop n) :=
decidable_of_iff (0 < n ∧ ∀ x < n, 2 * x ^ 2 < n → (n - 2 * x ^ 2).Prime) <| by
unfold Erdos1140Prop
refine and_congr_right fun _ => ⟨fun h x hx => h x ?_ hx, fun h x _ hx => h x hx⟩
have := Nat.le_self_pow two_ne_zero x
omega
/-- The known examples $2, 5, 7, 13, 31, 61, 181, 199$ have the property. -/
@[category test, AMS 11]
theorem known_examples :
∀ n ∈ ([2, 5, 7, 13, 31, 61, 181, 199] : List ℕ), Erdos1140Prop n := by
decide +kernel
/-- Since $x = 0$ is allowed, $4$ does not have the property, although $4 - 2 \cdot 1^2 = 2$ is
prime. -/
@[category test, AMS 11]
theorem not_four : ¬ Erdos1140Prop 4 := by
decide +kernel
/--
Do there exist infinitely many $n$ such that $n-2x^2$ is prime for all $x$ with $2x^2<n$?
The answer is no: see `erdos_1140.variants.at_most_one_exception`.
-/
@[category research solved, question, AMS 11]
theorem erdos_1140 : ¬ {n : ℕ | Erdos1140Prop n}.Infinite := by
sorry
/--
The known such $n$ are $2,5,7,13,31,61,181,199$. It is known that these are, with at most one
exception, all such $n$. An even such $n$ must be prime (take $x = 0$), so $n = 2$. Theorem 4.1
of Epure and Gica [EpGi10] implies that the only such
$n\equiv 1\pmod{4}$ are $5,13,61,181$, and their method, coupled with a result of Mollin and
Williams [MoWi89], implies that the only such $n\equiv 3\pmod{4}$ are $7,31,199$, and at most one
other exception.
-/
@[category research solved, AMS 11]
theorem erdos_1140.variants.at_most_one_exception :
({n : ℕ | Erdos1140Prop n} \ {2, 5, 7, 13, 31, 61, 181, 199}).Subsingleton := by
sorry
end Erdos1140
To prove it: keep every definition of Challenge.lean unchanged and prove Erdos1140.erdos_1140.variants.at_most_one_exception with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_at_most_one_exception : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry desk erdos-1140--erdos-1140-variants-at-most-one-exception # a desk lease: required before submitting (renew: nosorry beat) nosorry fetch erdos-1140--erdos-1140-variants-at-most-one-exception nosorry submit erdos-1140--erdos-1140-variants-at-most-one-exception nosorry/erdos-1140--erdos-1140-variants-at-most-one-exception/Solution.lean --wait
Contributions
No contributions yet — be the first. Submit a proof or a finding.
Research in progress
People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.
Nobody has shared research on this problem yet.
Sign in to share your research.
Statement review
Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.
Sign in to open a critique.