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

Fortune's Conjecture

A Fortunate number is the smallest integer $m > 1$ such that $p_n\# + m$ is prime, where $p_n\#$ denotes the primorial of the $n$-th prime — equivalently, the product of the first $n$ primes.

Fortune's Conjecture asserts that every Fortunate number is prime — equivalently, that no Fortunate number is composite.

The conjecture is named after the social anthropologist Reo Fortune, who proposed it. The first few Fortunate numbers are $3, 5, 7, 13, 23, 17, 19, 23, 37, 61, \ldots$ (OEIS A005235); all known values are prime.

References:

namespace FortuneConjectureopen Nat

For any natural number N there is some m > 1 with N + m prime; an immediate consequence of the infinitude of primes.

N:p:hp_ge:N + 2 php_prime:Nat.Prime phsum:N + (p - N) = pNat.Prime p; All goals completed! 🐙

The $n$-th Fortunate number (0-indexed): the smallest integer $m > 1$ such that $p_{n+1}\# + m$ is prime.

Nat.nth Nat.Prime n is the $(n+1)$-st prime (0-indexed), and primorial p is the product of all primes $\le p$; when $p$ is the $(n+1)$-st prime this equals the product of the first $n+1$ primes. Thus fortunateNumber 0 corresponds to $F_1 = 3$ in the OEIS A005235 indexing.

noncomputable def fortunateNumber (n : ) : := Nat.find (exists_one_lt_prime_add (primorial (Nat.nth Nat.Prime n)))

fortunateNumber n is greater than $1$, and adding it to the primorial of the $(n+1)$-st prime yields a prime.

@[category API, AMS 11] lemma fortunateNumber_spec (n : ) : 1 < fortunateNumber n Nat.Prime (primorial (Nat.nth Nat.Prime n) + fortunateNumber n) := Nat.find_spec (exists_one_lt_prime_add (primorial (Nat.nth Nat.Prime n)))

Minimality of fortunateNumber n: no smaller integer $m > 1$ makes primorial (Nat.nth Nat.Prime n) + m prime.

@[category API, AMS 11] lemma fortunateNumber_le (n m : ) (hm : 1 < m) (hp : Nat.Prime (primorial (Nat.nth Nat.Prime n) + m)) : fortunateNumber n m := Nat.find_min' (exists_one_lt_prime_add (primorial (Nat.nth Nat.Prime n))) hm, hphp:primorial (nth Nat.Prime 0) = 2m:hm:m < 3hm1:1 < mhmp:Nat.Prime (2 + m)False hp:primorial (nth Nat.Prime 0) = 2m:hm:2 < 3hm1:1 < 2hmp:Nat.Prime (2 + 2)False All goals completed! 🐙hp:primorial (nth Nat.Prime 1) = 6m:hm:m < 5hm1:1 < mhmp:Nat.Prime (6 + m)False hp:primorial (nth Nat.Prime 1) = 6m:hm:2 < 5hm1:1 < 2hmp:Nat.Prime (6 + 2)Falsehp:primorial (nth Nat.Prime 1) = 6m:hm:3 < 5hm1:1 < 3hmp:Nat.Prime (6 + 3)Falsehp:primorial (nth Nat.Prime 1) = 6m:hm:4 < 5hm1:1 < 4hmp:Nat.Prime (6 + 4)False hp:primorial (nth Nat.Prime 1) = 6m:hm:2 < 5hm1:1 < 2hmp:Nat.Prime (6 + 2)Falsehp:primorial (nth Nat.Prime 1) = 6m:hm:3 < 5hm1:1 < 3hmp:Nat.Prime (6 + 3)Falsehp:primorial (nth Nat.Prime 1) = 6m:hm:4 < 5hm1:1 < 4hmp:Nat.Prime (6 + 4)False All goals completed! 🐙hp:primorial (nth Nat.Prime 2) = 30m:hm:m < 7hm1:1 < mhmp:Nat.Prime (30 + m)False hp:primorial (nth Nat.Prime 2) = 30m:hm:2 < 7hm1:1 < 2hmp:Nat.Prime (30 + 2)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:3 < 7hm1:1 < 3hmp:Nat.Prime (30 + 3)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:4 < 7hm1:1 < 4hmp:Nat.Prime (30 + 4)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:5 < 7hm1:1 < 5hmp:Nat.Prime (30 + 5)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:6 < 7hm1:1 < 6hmp:Nat.Prime (30 + 6)False hp:primorial (nth Nat.Prime 2) = 30m:hm:2 < 7hm1:1 < 2hmp:Nat.Prime (30 + 2)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:3 < 7hm1:1 < 3hmp:Nat.Prime (30 + 3)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:4 < 7hm1:1 < 4hmp:Nat.Prime (30 + 4)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:5 < 7hm1:1 < 5hmp:Nat.Prime (30 + 5)Falsehp:primorial (nth Nat.Prime 2) = 30m:hm:6 < 7hm1:1 < 6hmp:Nat.Prime (30 + 6)False All goals completed! 🐙hp:primorial (nth Nat.Prime 3) = 210m:hm:m < 13hm1:1 < mhmp:Nat.Prime (210 + m)False hp:primorial (nth Nat.Prime 3) = 210m:hm:2 < 13hm1:1 < 2hmp:Nat.Prime (210 + 2)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:3 < 13hm1:1 < 3hmp:Nat.Prime (210 + 3)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:4 < 13hm1:1 < 4hmp:Nat.Prime (210 + 4)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:5 < 13hm1:1 < 5hmp:Nat.Prime (210 + 5)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:6 < 13hm1:1 < 6hmp:Nat.Prime (210 + 6)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:7 < 13hm1:1 < 7hmp:Nat.Prime (210 + 7)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:8 < 13hm1:1 < 8hmp:Nat.Prime (210 + 8)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:9 < 13hm1:1 < 9hmp:Nat.Prime (210 + 9)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:10 < 13hm1:1 < 10hmp:Nat.Prime (210 + 10)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:11 < 13hm1:1 < 11hmp:Nat.Prime (210 + 11)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:12 < 13hm1:1 < 12hmp:Nat.Prime (210 + 12)False hp:primorial (nth Nat.Prime 3) = 210m:hm:2 < 13hm1:1 < 2hmp:Nat.Prime (210 + 2)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:3 < 13hm1:1 < 3hmp:Nat.Prime (210 + 3)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:4 < 13hm1:1 < 4hmp:Nat.Prime (210 + 4)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:5 < 13hm1:1 < 5hmp:Nat.Prime (210 + 5)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:6 < 13hm1:1 < 6hmp:Nat.Prime (210 + 6)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:7 < 13hm1:1 < 7hmp:Nat.Prime (210 + 7)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:8 < 13hm1:1 < 8hmp:Nat.Prime (210 + 8)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:9 < 13hm1:1 < 9hmp:Nat.Prime (210 + 9)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:10 < 13hm1:1 < 10hmp:Nat.Prime (210 + 10)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:11 < 13hm1:1 < 11hmp:Nat.Prime (210 + 11)Falsehp:primorial (nth Nat.Prime 3) = 210m:hm:12 < 13hm1:1 < 12hmp:Nat.Prime (210 + 12)False All goals completed! 🐙

Fortune's Conjecture: Every Fortunate number is prime.

@[category research open, AMS 11] theorem fortune_conjecture : answer(sorry) ( n : , Nat.Prime (fortunateNumber n)) := True (n : ), Nat.Prime (fortunateNumber n) All goals completed! 🐙end FortuneConjecture