/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
import FormalConjecturesUtilPrimes congruent to ${3, 5, 6} \pmod 7$
Primes congruent to $3, 5, \text{ or } 6 \pmod 7$.
References:
namespace OeisA3625A prime $p$ is in A003625 if $p \equiv 3, 5, \text{ or } 6 \pmod 7$.
def A (p : ℕ) : Prop :=
p.Prime ∧ (p % 7 = 3 ∨ p % 7 = 5 ∨ p % 7 = 6)open Polynomial$3$ is in the sequence A003625.
@[category test, AMS 11]
theorem a_3 : A 3 := ⊢ A 3
⊢ Nat.Prime 3 ∧ (3 % 7 = 3 ∨ 3 % 7 = 5 ∨ 3 % 7 = 6)
All goals completed! 🐙$5$ is in the sequence A003625.
@[category test, AMS 11]
theorem a_5 : A 5 := ⊢ A 5
⊢ Nat.Prime 5 ∧ (5 % 7 = 3 ∨ 5 % 7 = 5 ∨ 5 % 7 = 6)
All goals completed! 🐙$13$ is in the sequence A003625.
@[category test, AMS 11]
theorem a_13 : A 13 := ⊢ A 13
⊢ Nat.Prime 13 ∧ (13 % 7 = 3 ∨ 13 % 7 = 5 ∨ 13 % 7 = 6)
All goals completed! 🐙$17$ is in the sequence A003625.
@[category test, AMS 11]
theorem a_17 : A 17 := ⊢ A 17
⊢ Nat.Prime 17 ∧ (17 % 7 = 3 ∨ 17 % 7 = 5 ∨ 17 % 7 = 6)
All goals completed! 🐙$19$ is in the sequence A003625.
@[category test, AMS 11]
theorem a_19 : A 19 := ⊢ A 19
⊢ Nat.Prime 19 ∧ (19 % 7 = 3 ∨ 19 % 7 = 5 ∨ 19 % 7 = 6)
All goals completed! 🐙Conjecture: Represents primes $p$ where the polynomial $x^2 + x + 2$ is irreducible over $\text{GF}(p)$.
Federico Provvedi, Jul 21 2018
Answer: true, the equivalence is classical (complete the square: $4(x^2+x+2) = (2x+1)^2 + 7$, then use quadratic reciprocity).
@[category research solved, AMS 11,
formal_proof using lean4 at
"https://github.com/KitaKen1/oeis-a003625-irreducibility/blob/d6c9f90827805142d81eee4e3d9099c8b48cbcc8/lean/OeisA3625FC.lean#L103-L104"]
theorem conjecture (p : ℕ) (hp : p.Prime) :
A p ↔ Irreducible (X ^ 2 + X + 2 : (ZMod p)[X]) := p:ℕhp:Nat.Prime p⊢ A p ↔ Irreducible (X ^ 2 + X + 2)
All goals completed! 🐙end OeisA3625