/-
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.
-/importFormalConjecturesUtil
Erdős and Graham [ErGr80] ask this allowing $p=2$, but this is presumably an oversight, since clearly
there are infinitely many solutions when $p=2$.
Observe that this creates $1! + a = 2^k$. For all $k$, fix $a = 2^k - 1$.
hfk:ℕh:0<2^k⊢ 1+(2^k-1)=2^k-- omega handles the Presburger arithmeticomegaAll goals completed! 🐙
Yu and Liu [YuLi96] showed that the only solutions to $(p-1)! + a^(p-1) = p^k$
for an odd prime p are:
$$
2! + 1^2 = 3\
2! + 5^2 = 3^3\
4! + 1^4 = 5^2
$$