# Integer Question

#### taitu

##### New member
Two integers will be taken from 1 to 50, where at least one of them should be a square number and sum of them should also be a square number. How many different pair like this can be found? Will I count (9,16) and (16,9) as one ?

#### HallsofIvy

##### Well-known member
MHB Math Helper
So $x^2+ y= z^2$ for x, y, and z integers. That is the same as $x^2- z^2= (x- z)(x+ z)= y$. Look at the ways to factor y: y= mn and the x- z= m, x+ z= n. Adding those two equations, 2x= m+ n, x= (m+ n)/2. Subtracting, 2z= n- m, z= (n- m)/2.

added much later: I've noticed that I have a sign error: from $x^2+ y= z^2$, $y= z^2- x^2$, not $x^2- x^2$. So y= (z- x)(z+ x). Taking y= mn, z- x= m, z+ x= n so that 2z= n+m, z= (n+m)/2, 2x= n- m so x= (n-m)/2, just the opposite of what I had before.

Last edited: