Primes Powers and Mods

If $(p-1)^p+1=p^k$ then

\begin{align*} k&=\log_p \left(1+(p-1)^p\right)\\ &=\log_p \left(p^p \left(\frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p\right)\right)\\ &=p+\log_p \left(\frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p\right) \end{align*}

clearly

$$\log_p \left(\frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p\right)<0$$

since $\frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p<1$

and so it suffices to show that

$$\log_p \left(\frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p\right)>-1$$

for $p>3$ since then $p+\log_p \left(\frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p\right)$ cannot be an integer for $p>3$. Differentiating $\left(1-\frac{1}{x}\right)^x$ we get that it is an increasing function and so for $p\geq5$ we get that

$$\left(1-\frac{1}{x}\right)^x\geq\left(1-\frac{1}{5}\right)^5>.3$$

for $p\geq5$ we also clearly have that $\frac{1}{p}\leq \frac{1}{5}=.2$: it is thus that

\begin{align*} \frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p &> \left(1-\frac{1}{p}\right)^p\\ &>.3\\ &>.2\\ &\geq \frac{1}{p} \end{align*}

taking logs base $p$ of both sides gets that

$$\log_p \left(\frac{1}{p^p}+\left(1-\frac{1}{p}\right)^p\right)>-1$$

and our proof is complete.