/-
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.
-/
module
public import FormalConjecturesUtilValues $m = \sigma(k)$ ($0 < m < 2n$) with $2n - 1 - m$ and $2n - 1 + m$ prime
Let $\sigma$ denote the sum-of-divisors function. The sequence $a(n)$ counts the integers $0 < m < 2n$ of the form $m = \sigma(k)$ ($k > 0$) such that $2n - 1 - m$ and $2n - 1 + m$ are both prime.
References:
@[expose] public sectionnamespace OeisA233864open ArithmeticFunctionopen scoped ArithmeticFunction.sigmaNumber of integers $m$ with $0 < m < 2n$ such that $m = \sigma(k)$ for some $k > 0$, and both $2n - 1 - m$ and $2n - 1 + m$ are prime, where $\sigma(k)$ is the sum of the positive divisors of $k$.
def a (n : ℕ) : ℕ :=
if n = 0 then 0
else
let twiceN : ℕ := 2 * n
let bigN : ℕ := twiceN - 1
let kDomain : Finset ℕ := Finset.Ico 1 twiceN
let sigmaValues : Finset ℕ := kDomain.image (σ 1)
(sigmaValues.filter (fun m : ℕ =>
m < bigN ∧
(bigN - m).Prime ∧
(bigN + m).Prime
)).card@[category test, AMS 11]
theorem a_1 : a 1 = 0 := ⊢ a 1 = 0 All goals completed! 🐙@[category test, AMS 11]
theorem a_2 : a 2 = 0 := ⊢ a 2 = 0 All goals completed! 🐙@[category test, AMS 11]
theorem a_3 : a 3 = 0 := ⊢ a 3 = 0 All goals completed! 🐙@[category test, AMS 11]
theorem a_4 : a 4 = 1 := ⊢ a 4 = 1 All goals completed! 🐙@[category test, AMS 11]
theorem a_5 : a 5 = 1 := ⊢ a 5 = 1 All goals completed! 🐙@[category test, AMS 11]
theorem a_6 : a 6 = 2 := ⊢ a 6 = 2 All goals completed! 🐙Conjecture (i): $a(n) > 0$ for all $n > 3$.
@[category research open, AMS 11]
theorem conjecture_1 (n : ℕ) (hn : 3 < n) : 0 < a n := n:ℕhn:3 < n⊢ 0 < a n
All goals completed! 🐙Conjecture (ii): For any even number $2n > 0$, $2n + \sigma(k)$ is prime for some $0 < k < 2n$.
@[category research open, AMS 11]
theorem conjecture_2 (n : ℕ) (hn : 0 < n) :
∃ k, 0 < k ∧ k < 2 * n ∧ Nat.Prime (2 * n + σ 1 k) := n:ℕhn:0 < n⊢ ∃ k, 0 < k ∧ k < 2 * n ∧ Nat.Prime (2 * n + (σ 1) k)
All goals completed! 🐙end OeisA233864