Determine all positive integer solutions of x

^{2y}+(x+1)

^{2y}=(x+2)

^{2y}
Of course, for y>1 you could use Fermat's theorem, but that would be unsporting!

This puzzle was pretty easy after I found the right method. Finding that method took far longer than I thought it would. The key is the identity a^n - b^n = [a - b] * [a^(n-1) + a^(n-2)*b + a^(n-3)*b^2 + ... + b^(n-1)].

Rearrange the equation as (x+2)^(2y) - (x+1)^(2y) = x^(2y)

Factor the left side as [(x+2)^2 - (x+1)^2] * [(x+2)^(2y-2) + (x+2)^(2y-4)(x+1)^2 + (x+2)^(2y-6)(x+1)^4 + ... + (x+1)^(2y-2)].

This corresponds to a=(x+2)^2 and b=(x+1)^2 in the identity given at the beginning.

Then (x+2)^2 - (x+1)^2 = 2x + 3 must be a factor of x^(2y).

2x+3=x^(2y) mod x implies 3=0 mod x. Then x is a factor of 3, namely 1 or 3.

Checking x=1: 1^(2y) + 2^(2y) = 3^(2y). This works if y=1/2, but y must be a positive integer.

Checking x=3: 3^(2y) + 4^(2y) = 5^(2y). This works for y=1.

The only solution is x=3, y=1 forming the equation 3^2 + 4^2 = 5^2.