/-
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 FormalConjecturesUtilSmallest prime $\equiv 1 \pmod n$
$$a(n) = \min {p \in \mathbb{P} \mid p \equiv 1 \pmod n}$$
References:
namespace OeisA34694Smallest prime $\equiv 1 \pmod n$.
noncomputable def a (n : ℕ) : ℕ :=
sInf {p : ℕ | Nat.Prime p ∧ n ∣ (p - 1)}
Value of the sequence a at 1.
@[category test, AMS 11]
theorem a_1 : a 1 = 2 := IsLeast.csInf_eq <| ⊢ IsLeast {p | Nat.Prime p ∧ 1 ∣ p - 1} 2 All goals completed! 🐙
Value of the sequence a at 2.
@[category test, AMS 11]
theorem a_2 : a 2 = 3 := IsLeast.csInf_eq <| ⊢ IsLeast {p | Nat.Prime p ∧ 2 ∣ p - 1} 3 All goals completed! 🐙
Value of the sequence a at 3.
@[category test, AMS 11]
theorem a_3 : a 3 = 7 := IsLeast.csInf_eq <| ⊢ IsLeast {p | Nat.Prime p ∧ 3 ∣ p - 1} 7 All goals completed! 🐙
Value of the sequence a at 4.
@[category test, AMS 11]
theorem a_4 : a 4 = 5 := IsLeast.csInf_eq <| ⊢ IsLeast {p | Nat.Prime p ∧ 4 ∣ p - 1} 5 All goals completed! 🐙
Value of the sequence a at 5.
@[category test, AMS 11]
theorem a_5 : a 5 = 11 := IsLeast.csInf_eq <| ⊢ IsLeast {p | Nat.Prime p ∧ 5 ∣ p - 1} 11 All goals completed! 🐙"Conjecture: $a(n) < n^2$ for $n > 1$. - Thomas Ordowski, Dec 19 2016"
@[category research open, AMS 11]
theorem conjecture (n : ℕ) (hn : 1 < n) : a n < n ^ 2 := n:ℕhn:1 < n⊢ a n < n ^ 2
All goals completed! 🐙end OeisA34694