/-
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 FormalConjecturesUtilValue of $n$-th cyclotomic polynomial at $n$
The sequence $a(n) = \Phi_n(n)$ gives the value of the $n$-th cyclotomic polynomial evaluated at $n$: $$a(n) = |\Phi_n(n)|$$
References:
namespace OeisA70518open PolynomialValue of the $n$-th cyclotomic polynomial at $n$.
noncomputable def a (n : ℕ) : ℕ :=
((cyclotomic n ℤ).eval (n : ℤ)).natAbs
Value of the sequence a at 1.
⊢ (eval 1 (X - 1)).natAbs = 0
simp All goals completed! 🐙
Value of the sequence a at 2.
@[category test, AMS 11]
theorem a_2 : a 2 = 3 := by ⊢ a 2 = 3
dsimp [a] ⊢ (eval 2 (cyclotomic 2 ℤ)).natAbs = 3
rw [cyclotomic_two ⊢ (eval 2 (X + 1)).natAbs = 3 ⊢ (eval 2 (X + 1)).natAbs = 3] ⊢ (eval 2 (X + 1)).natAbs = 3
simp All goals completed! 🐙
Value of the sequence a at 3.
@[category test, AMS 11]
theorem a_3 : a 3 = 13 := by ⊢ a 3 = 13
dsimp [a] ⊢ (eval 3 (cyclotomic 3 ℤ)).natAbs = 13
have : Fact (Nat.Prime 3) := ⟨by ⊢ Nat.Prime 3 this:Fact (Nat.Prime 3)⊢ (eval 3 (cyclotomic 3 ℤ)).natAbs = 13 decide All goals completed! 🐙 this:Fact (Nat.Prime 3)⊢ (eval 3 (cyclotomic 3 ℤ)).natAbs = 13⟩ this:Fact (Nat.Prime 3)⊢ (eval 3 (cyclotomic 3 ℤ)).natAbs = 13
rw [cyclotomic_prime ℤ 3 this:Fact (Nat.Prime 3)⊢ (eval 3 (∑ i ∈ Finset.range 3, X ^ i)).natAbs = 13 this:Fact (Nat.Prime 3)⊢ (eval 3 (∑ i ∈ Finset.range 3, X ^ i)).natAbs = 13] this:Fact (Nat.Prime 3)⊢ (eval 3 (∑ i ∈ Finset.range 3, X ^ i)).natAbs = 13
simp [Finset.sum_range_succ] All goals completed! 🐙
Value of the sequence a at 5.
@[category test, AMS 11]
theorem a_5 : a 5 = 781 := by ⊢ a 5 = 781
dsimp [a] ⊢ (eval 5 (cyclotomic 5 ℤ)).natAbs = 781
have : Fact (Nat.Prime 5) := ⟨by ⊢ Nat.Prime 5 this:Fact (Nat.Prime 5)⊢ (eval 5 (cyclotomic 5 ℤ)).natAbs = 781 decide All goals completed! 🐙 this:Fact (Nat.Prime 5)⊢ (eval 5 (cyclotomic 5 ℤ)).natAbs = 781⟩ this:Fact (Nat.Prime 5)⊢ (eval 5 (cyclotomic 5 ℤ)).natAbs = 781
rw [cyclotomic_prime ℤ 5 this:Fact (Nat.Prime 5)⊢ (eval 5 (∑ i ∈ Finset.range 5, X ^ i)).natAbs = 781 this:Fact (Nat.Prime 5)⊢ (eval 5 (∑ i ∈ Finset.range 5, X ^ i)).natAbs = 781] this:Fact (Nat.Prime 5)⊢ (eval 5 (∑ i ∈ Finset.range 5, X ^ i)).natAbs = 781
simp [Finset.sum_range_succ] All goals completed! 🐙open scoped Classical in$a(28341)$ is divisible by $283411^2$. What is the next $n$ such that $a(n)$ is not squarefree?
@[category research open, AMS 11]
theorem conjecture :
answer(sorry) =
if h : ∃ n, 28341 < n ∧ ¬ Squarefree (a n) then
some (sInf {n | 28341 < n ∧ ¬ Squarefree (a n)})
else
none := by ⊢ sorry = if h : ∃ n, 28341 < n ∧ ¬Squarefree (a n) then some (sInf {n | 28341 < n ∧ ¬Squarefree (a n)}) else none
sorry All goals completed! 🐙end OeisA70518