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

Mills' Theorem

There exists a real $A > 1$ such that $\lfloor A^{3^n}\rfloor$ is prime for every positive integer $n$, where $\lfloor\cdot\rfloor$ denotes the floor function.

The least such $A$ is known as Mills' constant. It is irrational, and assuming the Riemann hypothesis it is approximately $1.3063778838\ldots$.

References:

namespace Mills

Given any real $A$, IsMills A encodes the statement that $\lfloor A^{3^n}\rfloor,n > 0$ is prime.

abbrev IsMills (A : ) : Prop := (n : ℕ+), Prime A ^ (3 ^ (n : ))⌋₊

Mills' theorem (Mills, 1947). There is a real number $A > 1$ such that $\lfloor A^{3^n}\rfloor$ is prime.

@[category research solved, AMS 11] theorem exists' : A > 1, IsMills A := A > 1, IsMills A All goals completed! 🐙

For a real $A$, IsMinMills A is the smallest value satisfying IsMills A.

abbrev IsMinMills (A : ) : Prop := IsLeast {x | x > 1 IsMills x} A

Mills' constant. There is a least Mills number.

@[category research solved, AMS 11] theorem exists_least : A, IsMinMills A := A, IsMinMills A All goals completed! 🐙

Mills' constant is irrational (Saito, 2024).

@[category research solved, AMS 11] theorem irrational {A} (hA : IsMinMills A) : Irrational A := A:hA:IsMinMills AIrrational A All goals completed! 🐙

Mills' constant lower bound (Caldwell–Cheng, 2005): assuming the Riemann hypothesis, Mills' constant begins at $1.3063778838\ldots$.

@[category research solved, AMS 11] theorem lower_bound_of_RH (hRH : RiemannHypothesis) {A} (hA : IsMinMills A) : A Set.Ioo (1.3063778838 : ) 1.3063778839 := hRH:RiemannHypothesisA:hA:IsMinMills AA Set.Ioo 1.3063778838 1.3063778839 All goals completed! 🐙end Mills