I'm in a pretty simple "CS Math" course for year 1 Comp Sci, and I came across this: Disprove, $x^2 + y^2 = z^2$, such that $x, y, z$ are primes I thought of this as, if n is a prime, then prime factorization of n must be: $n = z*1$ $n^2 = (z*1)(z*1) = (z)(z)$
So I tried to derive a contradiction:
Assume $x, y, z$ are primes such that $x^2 + y^2 = z^2$ Then: $x^2 = z^2 - y^2$
Then: $x^2 = (z-y)(z+y)$ #Contradiction, prime factorization of $x^2$ must be uniquely represented.
But then I noticed that this statement is true if $z-y = 1$ and $z+y = x^2$, So:
Then: $y = -1+z = y = z-1$
Because: $x^2 + y^2 = z^2 $
Then: $(z-1)(z-1) + z+y = z^2$
Then: $z^2 - 2z + 1 + z + y = z^2$
Then: $z^2 - z + y + 1 = z^2$ # subtract $z^2$ from both sides
Then: $-z + y + 1 = 0$
Then: $y = -1 + z$
I remember reducing this to $x + y = z$, which I think is false?
EDIT: Thought of this:
z - y = 1
Then: z = y + 1
Then z must be 3, y must be 2
Because: z is greater than y by 1, since z is a prime and y is a prime, z and y must be 3 and 2 respectively since no other prime number is 1 apart because one of them would be even if greater than 2, and any even number has at least 3 divisors (2, the even number, and 1) thus not a prime.
Then: $x^2 + 2^2 = 3^2$ ,Because $2^2 = 4, 3^2 = 9$
Then: $x^2 = 9 - 4$
Then: $x = \sqrt5$
Contradiction: x is a prime, but sqrt(5) is not a prime!
Is this a solid evidence proof in that can I say that only prime numbers 1 apart are 2 and 3? I'm pretty sure there is a more simpler and intuitive way to prove this, are there any other ways to prove this via contradiction?