/- 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 FormalConjecturesUtil

Conjectures associated with A110854

$a(n) = \mathrm{prime}(2n+2) - \mathrm{prime}(2n+1) - \mathrm{prime}(2n) + \mathrm{prime}(2n-1)$, where $\mathrm{prime}(k)$ is the $k$-th prime number.

References:

namespace OeisA110854open Nat

The primary defining sequence a. $a(n)$ is $\mathrm{prime}(2n+2) - \mathrm{prime}(2n+1) - \mathrm{prime}(2n) + \mathrm{prime}(2n-1)$.

noncomputable def a (n : ) : := let p (k : ) : := (Nat.nth Nat.Prime (k - 1)).cast if n = 0 then 0 else p (2 * n + 2) - p (2 * n + 1) - p (2 * n) + p (2 * n - 1)h1:Nat.Prime 13nth Nat.Prime 5 = 13 All goals completed! 🐙h1:Nat.Prime 17nth Nat.Prime 6 = 17 All goals completed! 🐙h1:Nat.Prime 19nth Nat.Prime 7 = 19 All goals completed! 🐙h1:Nat.Prime 23nth Nat.Prime 8 = 23 All goals completed! 🐙h1:Nat.Prime 29nth Nat.Prime 9 = 29 All goals completed! 🐙

Term theorems verifying the first few values of the sequence against the official OEIS b-file

@[category test, AMS 11] theorem a_0 : a 0 = 0 := a 0 = 0 All goals completed! 🐙@[category test, AMS 11] theorem a_1 : a 1 = 1 := a 1 = 1 (nth Nat.Prime 3) - (nth Nat.Prime 2) - (nth Nat.Prime 1) + (nth Nat.Prime 0) = 1 All goals completed! 🐙13 - 11 - 7 + 5 = 0 All goals completed! 🐙19 - 17 - 13 + 11 = 0 All goals completed! 🐙29 - 23 - 19 + 17 = 4 All goals completed! 🐙

Do the absolute values cover A004275? A004275 is $1$ together with the nonnegative even numbers. The conjecture asks whether every member of A004275 occurs as $|a(n)|$ for some term of the sequence.

@[category research open, AMS 11] theorem conjecture : d : , (d = 1 Even d) n > 0, d = (a n).natAbs := (d : ), d = 1 Even d n > 0, d = (OeisA110854.a n).natAbs All goals completed! 🐙end OeisA110854