/-
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.
-/
module
public import FormalConjecturesUtilNumber of primes between $n^2$ and $n^2 + (\log_2 n)^2$
For $n \ge 1$, $a(n)$ is the number of primes between $n^2$ and $n^2 + (\log_2 n)^2$ inclusive, given by $\pi(\lfloor n^2 + (\log_2 n)^2 \rfloor) - \pi(n^2)$.
References:
@[expose] public sectionnamespace OeisA217317Number of primes between $n^2$ and $n^2 + (\log_2 n)^2$ inclusive.
noncomputable def a (n : ℕ) : ℕ :=
if n = 0 then 0
else
let upperBound : ℕ := Int.toNat ⌊(n : ℝ) ^ 2 + (Real.logb 2 n) ^ 2⌋
Nat.primeCounting upperBound - Nat.primeCounting (n ^ 2)@[category test, AMS 11]
theorem a_1 : a 1 = 0 := ⊢ a 1 = 0
All goals completed! 🐙h:Real.logb 2 2 = 1h2:⌊2 ^ 2 + 1 ^ 2⌋.toNat = 5⊢ a 2 = 1
unfold a h:Real.logb 2 2 = 1h2:⌊2 ^ 2 + 1 ^ 2⌋.toNat = 5⊢ (if 2 = 0 then 0
else
have upperBound := ⌊↑2 ^ 2 + Real.logb 2 ↑2 ^ 2⌋.toNat;
upperBound.primeCounting - (2 ^ 2).primeCounting) =
1
simp only [OfNat.ofNat_ne_zero, ↓reduceIte, Nat.cast_ofNat, h, h2] h:Real.logb 2 2 = 1h2:⌊2 ^ 2 + 1 ^ 2⌋.toNat = 5⊢ Nat.primeCounting 5 - (2 ^ 2).primeCounting = 1
decide All goals completed! 🐙
@[category test, AMS 11]
theorem a_4 : a 4 = 2 := by ⊢ a 4 = 2
have h : Real.logb 2 4 = 2 := by
rw [show (4 : ℝ) = 2 ^ (2 : ℕ) by ⊢ a 4 = 2 ⊢ ↑2 * 1 = 2 h:Real.logb 2 4 = 2⊢ a 4 = 2 norm_num All goals completed! 🐙 ⊢ ↑2 * 1 = 2 h:Real.logb 2 4 = 2⊢ a 4 = 2, Real.logb_pow, ⊢ ↑2 * Real.logb 2 2 = 2 ⊢ ↑2 * 1 = 2 h:Real.logb 2 4 = 2⊢ a 4 = 2
Real.logb_self_eq_one (by ⊢ 1 < 2 ⊢ ↑2 * 1 = 2 h:Real.logb 2 4 = 2⊢ a 4 = 2 norm_num All goals completed! 🐙 ⊢ ↑2 * 1 = 2 h:Real.logb 2 4 = 2⊢ a 4 = 2)] ⊢ ↑2 * 1 = 2 h:Real.logb 2 4 = 2⊢ a 4 = 2
norm_num h:Real.logb 2 4 = 2⊢ a 4 = 2 h:Real.logb 2 4 = 2⊢ a 4 = 2
have h2 : Int.toNat ⌊(4 : ℝ) ^ 2 + (2 : ℝ) ^ 2⌋ = 20 := by norm_num h:Real.logb 2 4 = 2⊢ Int.toNat 20 = 20 h:Real.logb 2 4 = 2h2:⌊4 ^ 2 + 2 ^ 2⌋.toNat = 20⊢ a 4 = 2; rfl h:Real.logb 2 4 = 2h2:⌊4 ^ 2 + 2 ^ 2⌋.toNat = 20⊢ a 4 = 2 h:Real.logb 2 4 = 2h2:⌊4 ^ 2 + 2 ^ 2⌋.toNat = 20⊢ a 4 = 2
unfold a h:Real.logb 2 4 = 2h2:⌊4 ^ 2 + 2 ^ 2⌋.toNat = 20⊢ (if 4 = 0 then 0
else
have upperBound := ⌊↑4 ^ 2 + Real.logb 2 ↑4 ^ 2⌋.toNat;
upperBound.primeCounting - (4 ^ 2).primeCounting) =
2
simp only [OfNat.ofNat_ne_zero, ↓reduceIte, Nat.cast_ofNat, h, h2] h:Real.logb 2 4 = 2h2:⌊4 ^ 2 + 2 ^ 2⌋.toNat = 20⊢ Nat.primeCounting 20 - (4 ^ 2).primeCounting = 2
decide All goals completed! 🐙
@[category test, AMS 11]
theorem a_8 : a 8 = 3 := by ⊢ a 8 = 3
have h : Real.logb 2 8 = 3 := by
rw [show (8 : ℝ) = 2 ^ (3 : ℕ) by ⊢ a 8 = 3 ⊢ ↑3 * 1 = 3 h:Real.logb 2 8 = 3⊢ a 8 = 3 norm_num All goals completed! 🐙 ⊢ ↑3 * 1 = 3 h:Real.logb 2 8 = 3⊢ a 8 = 3, Real.logb_pow, ⊢ ↑3 * Real.logb 2 2 = 3 ⊢ ↑3 * 1 = 3 h:Real.logb 2 8 = 3⊢ a 8 = 3
Real.logb_self_eq_one (by ⊢ 1 < 2 ⊢ ↑3 * 1 = 3 h:Real.logb 2 8 = 3⊢ a 8 = 3 norm_num All goals completed! 🐙 ⊢ ↑3 * 1 = 3 h:Real.logb 2 8 = 3⊢ a 8 = 3)] ⊢ ↑3 * 1 = 3 h:Real.logb 2 8 = 3⊢ a 8 = 3
norm_num h:Real.logb 2 8 = 3⊢ a 8 = 3 h:Real.logb 2 8 = 3⊢ a 8 = 3
have h2 : Int.toNat ⌊(8 : ℝ) ^ 2 + (3 : ℝ) ^ 2⌋ = 73 := by norm_num h:Real.logb 2 8 = 3⊢ Int.toNat 73 = 73 h:Real.logb 2 8 = 3h2:⌊8 ^ 2 + 3 ^ 2⌋.toNat = 73⊢ a 8 = 3; rfl h:Real.logb 2 8 = 3h2:⌊8 ^ 2 + 3 ^ 2⌋.toNat = 73⊢ a 8 = 3 h:Real.logb 2 8 = 3h2:⌊8 ^ 2 + 3 ^ 2⌋.toNat = 73⊢ a 8 = 3
unfold a h:Real.logb 2 8 = 3h2:⌊8 ^ 2 + 3 ^ 2⌋.toNat = 73⊢ (if 8 = 0 then 0
else
have upperBound := ⌊↑8 ^ 2 + Real.logb 2 ↑8 ^ 2⌋.toNat;
upperBound.primeCounting - (8 ^ 2).primeCounting) =
3
simp only [OfNat.ofNat_ne_zero, ↓reduceIte, Nat.cast_ofNat, h, h2] h:Real.logb 2 8 = 3h2:⌊8 ^ 2 + 3 ^ 2⌋.toNat = 73⊢ Nat.primeCounting 73 - (8 ^ 2).primeCounting = 3
decide All goals completed! 🐙
@[category test, AMS 11]
theorem a_16 : a 16 = 4 := by ⊢ a 16 = 4
have h : Real.logb 2 16 = 4 := by
rw [show (16 : ℝ) = 2 ^ (4 : ℕ) by ⊢ a 16 = 4 ⊢ ↑4 * 1 = 4 h:Real.logb 2 16 = 4⊢ a 16 = 4 norm_num All goals completed! 🐙 ⊢ ↑4 * 1 = 4 h:Real.logb 2 16 = 4⊢ a 16 = 4, Real.logb_pow, ⊢ ↑4 * Real.logb 2 2 = 4 ⊢ ↑4 * 1 = 4 h:Real.logb 2 16 = 4⊢ a 16 = 4
Real.logb_self_eq_one (by ⊢ 1 < 2 ⊢ ↑4 * 1 = 4 h:Real.logb 2 16 = 4⊢ a 16 = 4 norm_num All goals completed! 🐙 ⊢ ↑4 * 1 = 4 h:Real.logb 2 16 = 4⊢ a 16 = 4)] ⊢ ↑4 * 1 = 4 h:Real.logb 2 16 = 4⊢ a 16 = 4
norm_num h:Real.logb 2 16 = 4⊢ a 16 = 4 h:Real.logb 2 16 = 4⊢ a 16 = 4
have h2 : Int.toNat ⌊(16 : ℝ) ^ 2 + (4 : ℝ) ^ 2⌋ = 272 := by norm_num h:Real.logb 2 16 = 4⊢ Int.toNat 272 = 272 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272⊢ a 16 = 4; rfl h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272⊢ a 16 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272⊢ a 16 = 4
have hp : ∀ {k : ℕ}, (k + 1).Prime →
Nat.primeCounting (k + 1) = Nat.primeCounting k + 1 := fun {k} hk => by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272k:ℕhk:Nat.Prime (k + 1)⊢ (k + 1).primeCounting = k.primeCounting + 1 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4
rw [← Nat.primesLE_card_eq_primeCounting, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272k:ℕhk:Nat.Prime (k + 1)⊢ (k + 1).primesLE.card = k.primeCounting + 1 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4 ← Nat.primesLE_card_eq_primeCounting, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272k:ℕhk:Nat.Prime (k + 1)⊢ (k + 1).primesLE.card = k.primesLE.card + 1 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4
Nat.primesLE_succ, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272k:ℕhk:Nat.Prime (k + 1)⊢ (if Nat.Prime (k + 1) then insert (k + 1) k.primesLE else k.primesLE).card = k.primesLE.card + 1 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4 if_pos hk, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272k:ℕhk:Nat.Prime (k + 1)⊢ (insert (k + 1) k.primesLE).card = k.primesLE.card + 1 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4 Finset.card_insert_of_notMem (Nat.notMem_primesLE k) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272k:ℕhk:Nat.Prime (k + 1)⊢ k.primesLE.card + 1 = k.primesLE.card + 1 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1⊢ a 16 = 4
have hn : ∀ {k : ℕ}, ¬ (k + 1).Prime →
Nat.primeCounting (k + 1) = Nat.primeCounting k := fun {k} hk => by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1k:ℕhk:¬Nat.Prime (k + 1)⊢ (k + 1).primeCounting = k.primeCounting h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ a 16 = 4
rw [← Nat.primesLE_card_eq_primeCounting, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1k:ℕhk:¬Nat.Prime (k + 1)⊢ (k + 1).primesLE.card = k.primeCounting h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ a 16 = 4 ← Nat.primesLE_card_eq_primeCounting, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1k:ℕhk:¬Nat.Prime (k + 1)⊢ (k + 1).primesLE.card = k.primesLE.card h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ a 16 = 4
Nat.primesLE_succ, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1k:ℕhk:¬Nat.Prime (k + 1)⊢ (if Nat.Prime (k + 1) then insert (k + 1) k.primesLE else k.primesLE).card = k.primesLE.card h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ a 16 = 4 if_neg hk h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1k:ℕhk:¬Nat.Prime (k + 1)⊢ k.primesLE.card = k.primesLE.card h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ a 16 = 4] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ a 16 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ a 16 = 4
unfold a h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (if 16 = 0 then 0
else
have upperBound := ⌊↑16 ^ 2 + Real.logb 2 ↑16 ^ 2⌋.toNat;
upperBound.primeCounting - (16 ^ 2).primeCounting) =
4
simp only [OfNat.ofNat_ne_zero, ↓reduceIte, Nat.cast_ofNat, h, h2] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 272 - (16 ^ 2).primeCounting = 4
rw [show (16 ^ 2 : ℕ) = 256 by ⊢ a 16 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (271 + 1).primeCounting - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (271 + 1).primeCounting - Nat.primeCounting 256 = 4, show (272 : ℕ) = 271 + 1 from rfl h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (271 + 1).primeCounting - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (271 + 1).primeCounting - Nat.primeCounting 256 = 4] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (271 + 1).primeCounting - Nat.primeCounting 256 = 4
rw [hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (271 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 271 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 271 - Nat.primeCounting 256 = 4 : ¬ (271 + 1).Prime)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 271 - Nat.primeCounting 256 = 4
rw [show (271 : ℕ) = 270 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (270 + 1).primeCounting - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 270 + 1 - Nat.primeCounting 256 = 4 hp (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.Prime (270 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 270 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 270 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 270 + 1 - Nat.primeCounting 256 = 4
rw [show (270 : ℕ) = 269 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (269 + 1).primeCounting + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 269 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (269 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 269 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 269 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 269 + 1 - Nat.primeCounting 256 = 4
rw [show (269 : ℕ) = 268 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (268 + 1).primeCounting + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 268 + 1 + 1 - Nat.primeCounting 256 = 4 hp (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.Prime (268 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 268 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 268 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 268 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (268 : ℕ) = 267 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (267 + 1).primeCounting + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 267 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (267 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 267 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 267 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 267 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (267 : ℕ) = 266 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (266 + 1).primeCounting + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 266 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (266 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 266 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 266 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 266 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (266 : ℕ) = 265 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (265 + 1).primeCounting + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 265 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (265 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 265 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 265 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 265 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (265 : ℕ) = 264 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (264 + 1).primeCounting + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 264 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (264 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 264 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 264 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 264 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (264 : ℕ) = 263 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (263 + 1).primeCounting + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 263 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (263 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 263 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 263 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 263 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (263 : ℕ) = 262 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (262 + 1).primeCounting + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 262 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 hp (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.Prime (262 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 262 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 262 + 1 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 262 + 1 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (262 : ℕ) = 261 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (261 + 1).primeCounting + 1 + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 261 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (261 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 261 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 261 + 1 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 261 + 1 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (261 : ℕ) = 260 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (260 + 1).primeCounting + 1 + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 260 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (260 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 260 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 260 + 1 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 260 + 1 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (260 : ℕ) = 259 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (259 + 1).primeCounting + 1 + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 259 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (259 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 259 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 259 + 1 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 259 + 1 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (259 : ℕ) = 258 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (258 + 1).primeCounting + 1 + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 258 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (258 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 258 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 258 + 1 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 258 + 1 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (258 : ℕ) = 257 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (257 + 1).primeCounting + 1 + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 257 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 hn (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ ¬Nat.Prime (257 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 257 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 257 + 1 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 257 + 1 + 1 + 1 - Nat.primeCounting 256 = 4
rw [show (257 : ℕ) = 256 + 1 from rfl, h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ (256 + 1).primeCounting + 1 + 1 + 1 - Nat.primeCounting 256 = 4 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 256 + 1 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 hp (by h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.Prime (256 + 1) h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 256 + 1 + 1 + 1 + 1 - Nat.primeCounting 256 = 4 norm_num All goals completed! 🐙 h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 256 + 1 + 1 + 1 + 1 - Nat.primeCounting 256 = 4)] h:Real.logb 2 16 = 4h2:⌊16 ^ 2 + 4 ^ 2⌋.toNat = 272hp:∀ {k : ℕ}, Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting + 1hn:∀ {k : ℕ}, ¬Nat.Prime (k + 1) → (k + 1).primeCounting = k.primeCounting⊢ Nat.primeCounting 256 + 1 + 1 + 1 + 1 - Nat.primeCounting 256 = 4
omega All goals completed! 🐙Conjecture: For every $n > 4765516$, $a(n) > 0$.
@[category research open, AMS 11]
theorem conjecture (n : ℕ) (hn : 4765516 < n) : 0 < a n := by n:ℕhn:4765516 < n⊢ 0 < a n
sorry All goals completed! 🐙end OeisA217317