Show full file and definitions
/-
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 FormalConjecturesUtil
/-!
# Maximum exponent in the prime factorization of $n$
*References:*
- [A051903](https://oeis.org/A051903)-/
@[expose] public section
namespace OeisA51903
/-- Maximum exponent in the prime factorization of $n$. -/
def a (n : ℕ) : ℕ :=
(n.primeFactorsList.map (n.primeFactorsList.count ·)).foldr max 0
@[category test, AMS 11]
theorem a_1 : a 1 = 0 := by
decide +native
@[category test, AMS 11]
theorem a_2 : a 2 = 1 := by
decide +native
@[category test, AMS 11]
theorem a_3 : a 3 = 1 := by
decide +native
@[category test, AMS 11]
theorem a_4 : a 4 = 2 := by
decide +native
@[category test, AMS 11]
theorem a_5 : a 5 = 1 := by
decide +native
/--
Are there composite numbers $n > 4$ such that $n \equiv a(n) \pmod{\phi(n)}$?
- Thomas Ordowski, Dec 02 2019
This question is equivalent to Lehmer's totient problem `LehmerTotient.lehmer_totient`; a
positive answer here falsifies the universal statement asked about in
`Erdos828.erdos_828.variants.lehmer_conjecture`. Any composite
$n$ with $\phi(n) \mid n - 1$ is squarefree, so $a(n) = 1$ and the condition here holds.
Conversely, let $n > 4$ be composite with $\phi(n) \mid n - a(n)$ and $e = a(n) \ge 2$, and
pick $p$ with $p^e \mid n$. Then $p^{e-1} \mid \phi(n) \mid n - e$ and $p^{e-1} \mid n$, so
$p^{e-1} \mid e$, which forces $p = 2$ and $e = 2$. Now $n = 4m$ with $m$ odd and squarefree,
and $2\phi(m) \mid 4m - 2$ makes $\phi(m)$ odd, so $m = 1$ and $n = 4$. Hence $e = 1$ and the
condition is $\phi(n) \mid n - 1$.
-/
@[category research open, question, AMS 11]
theorem conjecture1 :
∃ n : ℕ, 4 < n ∧ ¬ n.Prime ∧ n.totient ∣ (n - a n) := by
sorry
set_option linter.style.formal_proof_palomar false in
/--
Are there odd numbers $n$ such that $a(n) > 1$ and $n \equiv a(n) \pmod{\lambda(n)}$?
(Equivalently, odd numbers $n$ such that $a(n) > 1$ and $b^n \equiv b^{a(n)} \pmod n$ for all $b$.)
- Thomas Ordowski, Dec 02 2019
The answer is no. Let $q^E \| n$ with $E = a(n) \ge 2$ and take $b = q + 1$: then
$(q+1)^{n-E} \equiv 1 \pmod{q^E}$, so lifting the exponent gives $q^{E-1} \mid n - E$. Since also
$q^{E-1} \mid n$, we get $q^{E-1} \mid E$, which is impossible for $q \ge 3$.
-/
@[category research solved, question, AMS 11, formal_proof using lean4 at
"https://github.com/anshM123/OEIS-A051903/blob/c0104e7a9cc2d76d86c3a277c372f91a9553a0f6/lean/DMSolutions/OEIS_A051903/Solution.lean#L21-L24"]
theorem conjecture2 :
¬ ∃ n : ℕ, Odd n ∧ 1 < a n ∧ ∀ b : ℕ, b ^ n ≡ b ^ (a n) [MOD n] := by
sorry
set_option linter.style.formal_proof_palomar false in
/--
Are there odd numbers $n$ such that $a(n) > 1$ and $n \equiv a(n) \pmod{\operatorname{ord}_n(2)}$?
(Equivalently, odd numbers $n$ such that $a(n) > 1$ and $2^n \equiv 2^{a(n)} \pmod n$.)
- Thomas Ordowski, Dec 02 2019
The answer is yes: $n = 7 \cdot 631 \cdot 881 \cdot 3511^2 \cdot 201961 = 9687963167864344937$ is odd,
$a(n) = 2$ and $2^n \equiv 2^2 \pmod n$. A square factor $q^2 \mid n$ forces $q$ to be a Wieferich
prime; $3511$ works because $\operatorname{ord}_{3511^2}(2) = 1755$ is odd and $n \equiv 2 \pmod{1755}$.
-/
@[category research solved, question, AMS 11, formal_proof using lean4 at
"https://github.com/anshM123/OEIS-A051903/blob/c0104e7a9cc2d76d86c3a277c372f91a9553a0f6/lean/DMSolutions/OEIS_A051903/Solution.lean#L27-L30"]
theorem conjecture3 :
∃ n : ℕ, Odd n ∧ 1 < a n ∧ 2 ^ n ≡ 2 ^ (a n) [MOD n] := by
sorry
end OeisA51903