this is what i have so far, but think i may have gone wrong somewhere, any ideas?We are looking for solutions of:
2^x + 3^y = z^2 [1]
where x, y, and z are non-negative integers.
We can see that [1] is a congruence modulo 8:
3^y = z^2 (mod 8) [2]
When z=1 and and y=2 we have
3^2 = 1 (mod 8) [3]
and by Fermat's theorem. So this means that y must be even.
As y is even, we can write y = 2k for some integer k. So we have:
3^2k + 2^x = z^2
z^2 - 3^2k = 2^x
(z + 3^k)(z - 3^k) = 2^x
We can see that [1] is a congruence modulo 3:
2^x = z^2 (mod 3) [4]
When z=1 and and y=2 we have
2^x = 1 (mod 3) [5]
and by Fermat's theorem. So this means that x must be even.
As x is even, we can write x = 2k for some integer l. So we have:
3^y + 2^2l = z^2
z^2 - 2^2l = 3^y
(z + 2^l)(z - 2^l) = 3^y
So we are left with
2^2l + 3^2k = z^2
(2^l )^2+ (3^k )^2=z^2 [6]
Which is a Pythagorean triple, where a^2+b^2=c^2. Where a=2^(x/2),b=3^(y/2) and c=z, we can assume that a,b,c are coprime due to Fermat’s Lemma.
We know that c has to be odd because if we assume c is even, then there exists another value C such that c=2∙C. Also that c^2 is divisible by 4 since
c^2=(2C)^2 =4C^2
We know a and b must be odd because a,b,c are coprime. As a and b are odd there must exist values A and B such that
a=2A+1,b=2B+1
but a^2+b^2 cannot be divisible by 4 since
a^2+b^2=(2A+1)^2+(2B+1)^2=4A^2+4A+1+4B^2+4B+1=4(A^2+A+B^2+B)+2
we have a contradiction so c is odd.
So we have a^2=(c+b)(c-b)and c+b and c-b must be even since c and b are odd. So therefore there must exist u,v,w such that
a=2u,c+b=2v,c-b=2w
which means that (2u)^2=(2v)(2w) dividing both sides by 4 gives us u^2=vw.
If we assume v and w are not coprime, then there exists d such that d>1 and d divides both v,w, then d divides both v+w and v-w, but
c+b +c-b=2v+2w
so 2c=2v+2w which means that c=v+w so d divides c.
Also c+b-(c+b)=2v-2w. So 2b=2v-2w which means that b=v-w, so d divides b. Which is a contradiction as c and b are coprime from [6].
So we reject our assumption and v and w are coprime. By properties of coprimes we know that v and w are squares of themselves. So there exists p,q such that
v=p^2,w=q^2
and we have our solutions since
c=v+w=p^2+q^2
b=v-w=p^2-q^2
a=2u=2pq (As u^2=vw which means u=pq)
We know p,q are relatively prime and opposite parity as z is odd, so we are left with.
(p^2+q^2)=(2pq)^2+(p^2-q^2 )^2
so z=c=v+w=p^2+q^2,3^(y/2)=b=v-w=p^2-q^2 and 2^((x/2) )=a=2u=2pq