/-
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.
-/importFormalConjecturesUtil
How many iterations of $n\mapsto\phi(n) + 1$ are needed before a prime is reached?
-- Formalisation note: the sequence of iterates always terminates if `n > 0`-- since it is strictly decreasing unless the input is prime, at which point-- it becomes static. See also https://oeis.org/A39651@[categoryresearchopen,AMS11]theoremerdos_409.parts.i(n:ℕ)(hn:0<n):IsLeast{i|(φ·+1)^[i]n|>.Prime}answer(sorry):=n:ℕhn:0<n⊢ IsLeast{i|Nat.Prime((funx↦φx+1)^[i]n)}sorryAll goals completed! 🐙
If $n > 0$, then the iteration $n\mapsto\phi(n) + 1$ necessarily
reaches a prime.
Let $c(n)$ be the minimum number of iterations of $n\mapsto\phi(n) + 1$ before a prime
is reached. Find the simplest function $g(n)$ such that $c(n) = O(g(n))$?
Let $c(n)$ be the minimum number of iterations of $n\mapsto\phi(n) + 1$ before a prime
is reached. Find the simplest function $g(n)$ such that $c(n) = o(g(n))$?
How many iterations of $n\mapsto\sigma(n) - 1$ are needed before a prime is reached?
-- Formalisation note: non-termination of this sequence is less clear since-- it is strictly increasing except at primes.@[categoryresearchopen,AMS11]theoremerdos_409.variants.sigma(n:ℕ)(hn:n>1):IsLeast{i|(σ1·-1)^[i]n|>.Prime}answer(sorry):=byn:ℕhn:n>1⊢ IsLeast{i|Nat.Prime((funx↦(σ1)x-1)^[i]n)}sorrysorryAll goals completed! 🐙
If $n > 1$ then the iteration $n\mapsto\sigma(n) - 1$ necessarily reaches a prime.
Note: this is open — it is not clear that the σ iteration always terminates,
since it is non-decreasing (unlike the φ iteration which is strictly decreasing).
Let $c(n)$ be the minimum number of iterations of $n\mapsto\sigma(n) - 1$ before a prime
is reached. Find the simplest function $g(n)$ such that $c(n) = O(g(n))$?
Let $c(n)$ be the minimum number of iterations of $n\mapsto\sigma(n) - 1$ before a prime
is reached. Find the simplest function $g(n)$ such that $c(n) = o(g(n))$?