Find all triples $(p,x,y)$ such that $ p^x=y^4+4$ Find all triples $(p,x,y)$ such that $ p^x=y^4+4$, where $ p$ is a prime and $ x$ and $ y$ are natural numbers.
I know that this question has already been asked on another forum, but I want to ask different questions about it.
$ p^x=y^4+4$
$ p^x=(y^2+2)^2 - (2y)^2$
$p^x = (y^2+2y+2)(y^2-2y+2)$
Then: $p^k = y^2+2y+2$ and $p^j= y^2-2y+2$
The solutions I saw were different from here and they just wanted to prove that $(5,1,1)$ was the only solution. I´ll just ask what I didn't understand:
1)
Therefore, $p^k = (y+1)^2+1$ and $p^j= (y-1)^2+1$
And then: $(y+1)^2 \equiv (y-1)^2 \equiv -1 \pmod p$
So here $-1$ is a quadratic residue, and therefore $p= 4n+1$. I understood his solution until this part. 


*

*I know that $p= 4n+1$ because I saw that was one of the properties of quadratic residues, but would like to see a proof of it if possible.

*He then says that by$\mod 8$ , $ k$ and $j$ had different parity, so $x$ was odd.
Then he assumes that $p, k >1$ and says:


*

*If $k=2m$, then: $(y+1)^2= (p^m+1)(p^m -1)$ or if $j= 2m$: then $(y-1)^2= (p^m+1)(p^m -1)$ and affirms those equations have no solution, that might be a property but want to know about it anyway.


Then he says there are no solution for $x>1$, then $p = (y^2+2y+2)(y^2-2y+2)$, so $1=y^2-2y+2$ and that was the triple $(5,1,1)$, therefore that is the only solution.
2) 
He started off by saying: if $y$ is even then $ p^k \equiv  p^j \equiv 2 \pmod 4$ then $a = b =1$ and that is not possible, therefore $y$ is odd.


*

*Since $ 4y = p^{b} - p^{a}$, therefore $ p^{b-a}=5$, $ p^{a}=y$

*$ 2y^{2}+4=p^{b}+p^{a}$, if $ a\neq 0$, then $ y^2 \equiv 3\mod 5$, which is impossible.


I don´t know how you can deduce those things. After that he affirmed that $(5,1,1)$ was the only solution.
3) He showed that $y$ was odd and said:


*

*$gcd (y^2+2y+2, y^2-2y+2) = gcd (y^2+2y+2, 4y) = 1$ (I think this is also a property but I don´t even know it).


And since $y^2+2y+2 >  y^2-2y+2$, then $y^2+2y+2=p^x$ and $y^2-2y+2 =1$, so $y=1$ and $(5,1,1)$ was the only solution.
Sorry if I asked many things, I just thought those things may be useful for other problems. I pointed out the things I didn´t understood so that it was easy to see them. Thanks in advance.

There is a MUCH easier way to finish.
Starting from $p^k=y^2+2y+2$; $p^j=y^2-2y+2$ we note on the one hand, the following inequality $y^2+2y+2 > y^2-2y+2$ (for natural numbers $y$) and so $j<k$, and therefore
$y^2+2y+2$ must be of the form $p^i(y^2-2y+2)$ for some prime and some positive integer $i$.
On the other hand, we note the following: $y^2+2y+2 < 2(y^2-2y+2)$ for all $y \geq 6$.
So we conclude e.g., $y \le 5$ and $p^x \le 5^4+4$. Furthermore using the above reasoning you can conclude $p \le 5$ if $y \in \{2,3,4,5\}$. This leaves us only a very small set of triples to check via brute force.
