All solutions are (1,1,1), (11,1,3), (3,2,2).
We first deal with the case y≥2. We have
x2≡5z(mod8),
and x2≡0,1,4, 5z≡1,5, so z is even. Let z=2z′, then
x2+(2y)2=(5z′)2.
Since 5z′ and 2y are coprime and 2∣2y, by the Pythagorean triple formula we have
x=m2−n2,2y=2mn,5z′=m2+n2,
where m,n are coprime and m>n. From 2y=2mn we get m=2y−1,n=1, so 5z′=22(y−1)+1.
If y≥3, then
5z′≡1(mod8)⟹2∣z′,
let z′=2z′′, then
(5z′′+1)(5z′′−1)=22(y−1)⟹5z′′+1=2a, 5z′′−1=2b.
Note that 4 does not divide one of 5z′′+1 and 5z′′−1, so a=1 or b=1, and it is easy to see there is no solution in this case.
If y=2, we obtain the solution (x,y,z)=(3,2,2).
Now suppose y=1. We have
x2+4≡5z(mod8),
and x2+4≡0,4,5, 5z≡1,5, so z is odd. Let z=2z′+1, and consider the Pell equation
s2−5t2=−4,
we wish to find solutions (s,t)=(x,5z′). If (s,t) is a solution in positive integers, we know that (23s−5t,23t−s) is also a solution in integers (note that s,t have the same parity), so we can always descend a solution (s,t) until
3s≤5t or 3t≤s.
Note that 3t>s always holds. For 3s≤5t, we have
−20t2=25t2−45t2≥9(s2−5t2)=−36⟹t=1⟹s=1.
Thus we obtain all positive integer solutions (sn,tn) satisfying
(s0,t0)=(1,1),sn+1=23sn+5tn,tn+1=23tn+sn.
Observing the first few terms (s1,t1)=(4,2), (s2,t2)=(11,5), ..., and considering the Fibonacci sequence
F0=0,F1=1,F2=1,F3=2,F4=3,F5=5,…,
from the above recurrence we can guess and verify that
(sn,tn)=(F2n+2+F2n,F2n+1).
If tn=5z′, we get z′=0 or 5∣F2n+1. The former gives the solution (x,y,z)=(1,1,1), and the latter, by the pattern of the Fibonacci sequence modulo 5, gives 5∣n′:=2n+1. If p=5 is a prime factor of n′, then p>2 and
Fp∣Fn′=5z′,
but Fp=1 and 5∤Fp, a contradiction. Therefore n′ is a power of 5. If z′>1, then n′>5, so 25∣n′, hence F25∣Fn′=5z′, but F25=75025 is not a power of 5, a contradiction. Therefore z′=1, and we obtain the solution (x,y,z)=(11,1,3).