It is obvious that x≥1, y is odd and 21x≡0(mod7). Since 23≡1(mod7) then we have 23n≡1(mod7), 23n+1≡2(mod7), and 23n+2≡4(mod7). On the other hand, y3≡0(mod7) or y3≡±1(mod7). So, on account of the preceding, we have x=3n for all positive integer n≥1. Putting x=3n the first equation becomes
23n+213n=y3⇔(y−21n)(y2+y⋅21n+212n)=23n
Form the preceding immediately follows that (y2+y⋅21n+212n)∣23n and this it is not possible on account that y2+y⋅21n+212n>1 is an odd positive integer. This completes the proof of the first part of the statement.
To find the solutions in positive integers of the second equation we distinguish the following cases:
1. When x=0 we have (z−1)(z+1)=21y. Let d=gcd(z−1,z+1). Since d∣21y and d∣(z+1)−(z−1)=2, then d=1 and
{z−1=1,z+1=21y⇒21y=3
which is impossible.
2. When x=1 we have 2+21y=z2 which it is not possible because 2+21y≡2(mod3) and z2≡0(mod3) or z2≡1(mod3).
3. When x=2 we have (z−2)(z+2)=21y. Let d=gcd(z−2,z+2). Since d∣21y and d∣((z+2)−(z−2)=4), then d=1 and we have
{z−2=1,z+2=21yor{z−2=3y,z+2=7y
In the first case we obtain, after subtraction, 21y=5 (impossible). In the second case, we get 7y−3y=4. For y≥2 we have
7y−3y=3y[(37)y−1]≥9[(37)2−1]>4,
and y=1 verifies the equation 22+21=52.
When y=0 we have the equation (z−1)(z+1)=2x. Let d=(z−1,z+1). Since d∣2x and d∣(z+1)−(z−1)=2 then d=2 because z is odd. So, we have
{z−1=2,z+1=2x−1⇒z=3,x=3
for which is 23+210=32.
4. Finally, assume that x≥3 and y≥1 and observe that z is odd. We prove that y is even number. Indeed, if y=2p+1, then on account that 212p≡1(mod8) and 21≡5(mod8) we have 212p+1≡5(mod8). So, 2x+21y≡5(mod8) and z2≡1(mod8) (impossible). Therefore, y=2p and then we have 2x=z2−212p=(z−21p)(z+21p). Let d=(z−21p,z+21p). Since d∣2x, z is odd and d∣(z+21p)−(z−21p)=2⋅21p, we have
{z−21p=2,z+21p=2x−1
from which follows 2x−1−2=2⋅21p or 2x−2=1+21p. When x=3, we have p=0. That is, y=0 in contradiction with y≥1. For x≥4, we have 2x−2≡0(mod4) and (1+21p)≡2(mod4).
In conclusion, the solutions are x=3,y=0,z=3 and x=2,y=1,z=5.