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

Riesel Problem

Riesel problem: let $k=2n-1$; then $a(n)$ is the smallest $m \ge 1$ such that $k \cdot 2^m-1$ is prime, or $-1$ if no such prime exists.

References:

namespace OeisA108129variable {m n : }open Natopen Classical in

The primary defining sequence a. Riesel problem: let $k=2n-1$; then $a(n)$ is the smallest $m \ge 1$ such that $k \cdot 2^m-1$ is prime, or $-1$ if no such prime exists.

noncomputable def a (n : ) : := if n = 0 then 0 -- Use classical choice to find the minimum, or return -1 if no such prime exists. else if h : m, m 0 ((2 * n - 1) * 2 ^ m - 1).Prime then Nat.find h else -1All goals completed! 🐙@[category test, AMS 11] theorem a_1 : a 1 = 2 := a_of_isLeast <| IsLeast {m | m 0 Nat.Prime ((2 * 1 - 1) * 2 ^ m - 1)} 2 All goals completed! 🐙@[category test, AMS 11] theorem a_2 : a 2 = 1 := a_of_isLeast <| IsLeast {m | m 0 Nat.Prime ((2 * 2 - 1) * 2 ^ m - 1)} 1 All goals completed! 🐙@[category test, AMS 11] theorem a_3 : a 3 = 2 := a_of_isLeast <| IsLeast {m | m 0 Nat.Prime ((2 * 3 - 1) * 2 ^ m - 1)} 2 All goals completed! 🐙@[category test, AMS 11] theorem a_4 : a 4 = 1 := a_of_isLeast <| IsLeast {m | m 0 Nat.Prime ((2 * 4 - 1) * 2 ^ m - 1)} 1 All goals completed! 🐙

It is conjectured that the integer $k = 509203$ is the smallest Riesel number, that is, the first $n$ such that $a(n) = -1$ is $254602$.

@[category research open, AMS 11] theorem conjecture : a 254602 = -1 ( n : , 1 n n < 254602 a n -1) := a 254602 = -1 (n : ), 1 n n < 254602 OeisA108129.a n -1 All goals completed! 🐙end OeisA108129