/-
Copyright 2025 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 FormalConjecturesUtilErdős Problem 9
namespace Erdos9
The set of odd numbers that cannot be expressed as a prime plus two powers of 2.
def Erdos9A : Set ℕ := { n | Odd n ∧ ¬ ∃ (p k l : ℕ), (Nat.Prime p) ∧ n = p + 2 ^ k + 2 ^ l }
@[category test, AMS 5 11]
theorem erdos9A_contains_one : 1 ∈ Erdos9A := ⊢ 1 ∈ Erdos9A
⊢ Odd 1⊢ ¬∃ p k l, Nat.Prime p ∧ 1 = p + 2 ^ k + 2 ^ l
⊢ Odd 1 All goals completed! 🐙
⊢ ¬∃ p k l, Nat.Prime p ∧ 1 = p + 2 ^ k + 2 ^ l ⊢ ∀ (p k l : ℕ), Nat.Prime p → 1 ≠ p + 2 ^ k + 2 ^ l
intro p p:ℕk:ℕ⊢ ∀ (l : ℕ), Nat.Prime p → 1 ≠ p + 2 ^ k + 2 ^ l p:ℕk:ℕl:ℕ⊢ Nat.Prime p → 1 ≠ p + 2 ^ k + 2 ^ l p:ℕk:ℕl:ℕhp:Nat.Prime p⊢ 1 ≠ p + 2 ^ k + 2 ^ l
All goals completed! 🐙
@[category test, AMS 5 11]
theorem erdos9A_contains_three : 3 ∈ Erdos9A := ⊢ 3 ∈ Erdos9A
⊢ Odd 3⊢ ¬∃ p k l, Nat.Prime p ∧ 3 = p + 2 ^ k + 2 ^ l
⊢ Odd 3 All goals completed! 🐙
⊢ ¬∃ p k l, Nat.Prime p ∧ 3 = p + 2 ^ k + 2 ^ l ⊢ ∀ (p k l : ℕ), Nat.Prime p → 3 ≠ p + 2 ^ k + 2 ^ l
intro p p:ℕk:ℕ⊢ ∀ (l : ℕ), Nat.Prime p → 3 ≠ p + 2 ^ k + 2 ^ l p:ℕk:ℕl:ℕ⊢ Nat.Prime p → 3 ≠ p + 2 ^ k + 2 ^ l p:ℕk:ℕl:ℕhp:Nat.Prime p⊢ 3 ≠ p + 2 ^ k + 2 ^ l
All goals completed! 🐙
@[category test, AMS 5 11]
theorem erdos9A_not_contains_five : 5 ∉ Erdos9A := ⊢ 5 ∉ Erdos9A
⊢ 5 ∉ {n | Odd n ∧ ¬∃ p k l, Nat.Prime p ∧ n = p + 2 ^ k + 2 ^ l}
⊢ Odd 5 → ∃ x, ∃ (_ : Nat.Prime x), ∃ x_1 x_2, 5 = x + 2 ^ x_1 + 2 ^ x_2
a✝:Odd 5⊢ ∃ x, ∃ (_ : Nat.Prime x), ∃ x_1 x_2, 5 = x + 2 ^ x_1 + 2 ^ x_2
a✝:Odd 5⊢ 5 = 3 + 2 ^ 0 + 2 ^ 0
All goals completed! 🐙
The set is known to be infinite. In [Er77c] Erdős credits Schinzel with proving that there are infinitely many odd integers not of this form, but gives no reference.
[Er77c] Erdős, P.,
@[category research solved, AMS 5 11]
theorem erdos_9.variants.infinite : Erdos9A.Infinite := ⊢ Erdos9A.Infinite
All goals completed! 🐙
Is the upper density of the set of odd numbers that cannot be expressed as a prime plus two powers of 2 positive?
@[category research open, AMS 5 11]
theorem erdos_9 : answer(sorry) ↔ 0 < Erdos9A.upperDensity := ⊢ True ↔ 0 < Erdos9A.upperDensity
All goals completed! 🐙
end Erdos9