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

Erdős Problem 828

Reference: erdosproblems.com/828

namespace Erdos828 open scoped Nat

Is it true that, for any $a \in \mathbb{Z}$, there are infinitely many $n$ such that $$\phi(n) | n + a$$?

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_828 : answer(sorry) a : , Set.Infinite {n : | (φ n) n + a} := True (a : ), {n | (φ n) n + a}.Infinite All goals completed! 🐙

When $n > 1$, Lehmer conjectured that $\phi(n) | n - 1$ if and only if $n$ is prime.

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_828.variants.lehmer_conjecture : answer(sorry) n > 1, φ n n - 1 Prime n := True n > 1, φ n n - 1 Prime n All goals completed! 🐙

It is an easy exercise to show that $\phi(n) | n$ if and only if $n = 0, 1$ or $n = 2^a 3^b$ for some $a > 0$.

@[category textbook, AMS 11, formal_proof using formal_conjectures at "https://github.com/XC0R/formal-conjectures/blob/03e00cf8d44098d0fb06e891fca30c29769df619/FormalConjectures/ErdosProblems/828.lean#L49"] theorem declaration uses 'sorry'erdos_828.variants.phi_dvd_self_iff_pow2_pow3 {n : } : φ n n n 1 ∃ᵉ (a > 0) (b), n = 2 ^ a * 3 ^ b := n:φ n n n 1 a > 0, b, n = 2 ^ a * 3 ^ b All goals completed! 🐙 end Erdos828