Let's consider the arithmetic function $\,f(p,q)=q^{p-1}+(p-1)^q\,$ where $\,p\,$ and $\,q\,$ are prime numbers and $\,p\ne q$.
Using Fermat's little theorem it's easy to prove that $\;f(p,q)\equiv 0\mod p$.
In the case $\,p=5\,$ we have, for example:
$$7^4+4^7=18785=5\cdot13\cdot17^2$$ $$11^4+4^{11}=4208945=5\cdot13^2\cdot17\cdot293$$ $$13^4+4^{13}=67137425=5^2\cdot37\cdot181\cdot401$$
We note, in this case, that the prime factors of $\,f(p,q)\,$ are all of the form $\,4m+1$.
This should be a consequence of the fact that $\,q^4+4^q=(q^2)^2+(2^q)^2$.
I ask for a formal proof eventually extensible to the more general case $\,p=2^k+1\;(17, 257, ...)$.
Many thanks.
If you consider $p,q\neq 2$ prime number. $p=2^{2k}+1$ than you can easy write \begin{equation} f(p,q)=(q^{2^{2k-1}})^2+(2^{kq})^2 \end{equation} that means that $f(p,q)$ is a sum of squares. It's a well known fact that if a number can be written as a sum of squares that it's of the form $4m+1$ for some integer $m$. More than that every prime that divides a sum of squares can be written in that form and that answer your question. The results I use are easy consequences of the prime splitting in $\mathbb{Z}[i]$.