Inspired by Martin Hopf I used another number theoretical function for this question.
If $\sigma(n)$ is the divisor-sum function ($1$ and $n$ are included, $\sigma(1)=1$) , can we have $$n^ 2\mid \sigma(n)^{\sigma(n)}-1$$ for an integer $n>1$ ?
- There is no solution for $n\le 10^9$
- $n$ cannot be a prime power , since for $n=p^k$ we can easily prove $$\sigma(n)^{\sigma(n)}-1 \equiv p\mod p^2$$
- If $n$ is even, $\sigma(n)$ must be odd which is only possible if $n$ is a perfect square or twice a perfect square ($1$ would also be allowed as the perfect square , but $n=2$ gives no solution). In this case, there is no solution below $10^{14}$. This search limit includes also the odd perfect squares.