/-
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 $x$ such that $\sigma(x) \bmod x = n$
The sequence $a(n)$ is the smallest positive integer $x$ such that $\sigma_1(x) \bmod x = n$, or $0$ if no such $x$ exists.
References:
namespace OeisA76495open ArithmeticFunctionopen Classical inSmallest positive integer $x$ such that $\sigma_1(x) \bmod x = n$, or $0$ if no such $x$ exists.
noncomputable def a (n : ℕ) : ℕ :=
if h : ∃ x, 0 < x ∧ (sigma 1 x : ℕ) % x = n then
Nat.find h
else
0
Value of the sequence a at 1.
pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 1⊢ (0 < 2 ∧ (sigma 1) 2 % 2 = 1) ∧ ∀ n < 2, ¬(0 < n ∧ (sigma 1) n % n = 1)
decide +native All goals completed! 🐙
· neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 1⊢ False exact (h ⟨2, by h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 1⊢ 0 < 2 ∧ (sigma 1) 2 % 2 = 1 decide +native All goals completed! 🐙⟩).elim
Value of the sequence a at 2.
@[category test, AMS 11]
theorem a_2 : a 2 = 20 := by ⊢ a 2 = 20
classical
dsimp [a] ⊢ (if h : ∃ x, 0 < x ∧ (sigma 1) x % x = 2 then Nat.find h else 0) = 20
split_ifs with h pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ Nat.find h = 20neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ False
· pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ Nat.find h = 20 rw [Nat.find_eq_iff pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ (0 < 20 ∧ (sigma 1) 20 % 20 = 2) ∧ ∀ n < 20, ¬(0 < n ∧ (sigma 1) n % n = 2) pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ (0 < 20 ∧ (sigma 1) 20 % 20 = 2) ∧ ∀ n < 20, ¬(0 < n ∧ (sigma 1) n % n = 2)] pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ (0 < 20 ∧ (sigma 1) 20 % 20 = 2) ∧ ∀ n < 20, ¬(0 < n ∧ (sigma 1) n % n = 2)
decide +native All goals completed! 🐙
· neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ False exact (h ⟨20, by h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 2⊢ 0 < 20 ∧ (sigma 1) 20 % 20 = 2 decide +native All goals completed! 🐙⟩).elim
Value of the sequence a at 3.
@[category test, AMS 11]
theorem a_3 : a 3 = 4 := by ⊢ a 3 = 4
classical
dsimp [a] ⊢ (if h : ∃ x, 0 < x ∧ (sigma 1) x % x = 3 then Nat.find h else 0) = 4
split_ifs with h pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ Nat.find h = 4neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ False
· pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ Nat.find h = 4 rw [Nat.find_eq_iff pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ (0 < 4 ∧ (sigma 1) 4 % 4 = 3) ∧ ∀ n < 4, ¬(0 < n ∧ (sigma 1) n % n = 3) pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ (0 < 4 ∧ (sigma 1) 4 % 4 = 3) ∧ ∀ n < 4, ¬(0 < n ∧ (sigma 1) n % n = 3)] pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ (0 < 4 ∧ (sigma 1) 4 % 4 = 3) ∧ ∀ n < 4, ¬(0 < n ∧ (sigma 1) n % n = 3)
decide +native All goals completed! 🐙
· neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ False exact (h ⟨4, by h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 3⊢ 0 < 4 ∧ (sigma 1) 4 % 4 = 3 decide +native All goals completed! 🐙⟩).elim
Value of the sequence a at 4.
@[category test, AMS 11]
theorem a_4 : a 4 = 9 := by ⊢ a 4 = 9
classical
dsimp [a] ⊢ (if h : ∃ x, 0 < x ∧ (sigma 1) x % x = 4 then Nat.find h else 0) = 9
split_ifs with h pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ Nat.find h = 9neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ False
· pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ Nat.find h = 9 rw [Nat.find_eq_iff pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ (0 < 9 ∧ (sigma 1) 9 % 9 = 4) ∧ ∀ n < 9, ¬(0 < n ∧ (sigma 1) n % n = 4) pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ (0 < 9 ∧ (sigma 1) 9 % 9 = 4) ∧ ∀ n < 9, ¬(0 < n ∧ (sigma 1) n % n = 4)] pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ (0 < 9 ∧ (sigma 1) 9 % 9 = 4) ∧ ∀ n < 9, ¬(0 < n ∧ (sigma 1) n % n = 4)
decide +native All goals completed! 🐙
· neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ False exact (h ⟨9, by h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 4⊢ 0 < 9 ∧ (sigma 1) 9 % 9 = 4 decide +native All goals completed! 🐙⟩).elim
Value of the sequence a at 6.
@[category test, AMS 11]
theorem a_6 : a 6 = 25 := by ⊢ a 6 = 25
classical
dsimp [a] ⊢ (if h : ∃ x, 0 < x ∧ (sigma 1) x % x = 6 then Nat.find h else 0) = 25
split_ifs with h pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ Nat.find h = 25neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ False
· pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ Nat.find h = 25 rw [Nat.find_eq_iff pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ (0 < 25 ∧ (sigma 1) 25 % 25 = 6) ∧ ∀ n < 25, ¬(0 < n ∧ (sigma 1) n % n = 6) pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ (0 < 25 ∧ (sigma 1) 25 % 25 = 6) ∧ ∀ n < 25, ¬(0 < n ∧ (sigma 1) n % n = 6)] pos h:∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ (0 < 25 ∧ (sigma 1) 25 % 25 = 6) ∧ ∀ n < 25, ¬(0 < n ∧ (sigma 1) n % n = 6)
decide +native All goals completed! 🐙
· neg h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ False exact (h ⟨25, by h:¬∃ x, 0 < x ∧ (sigma 1) x % x = 6⊢ 0 < 25 ∧ (sigma 1) 25 % 25 = 6 decide +native All goals completed! 🐙⟩).elimAt present, the 0 entry for $n = 5$ is only a conjecture. That is, it is conjectured that there is no positive integer $x$ such that $\sigma_1(x) \bmod x = 5$.
@[category research open, AMS 11]
theorem conjecture : a 5 = 0 := by ⊢ a 5 = 0
sorry All goals completed! 🐙end OeisA76495