Finding all solutions to $x^2+y^2=2010$

456 Views Asked by At

I need to find all integer solutions to $x^2+y^2=2010$. we can take $x\leq y$ for commodity.

The problem can be tackled through brute force.

We need $1005\leq x^2\leq 2010$ and so $32\leq x \leq 44$. One way to solve it is to see if $2010-x^2$ is a square for all of those values. Since they are only thirteen I think this can be solved in about eight minutes. Is there an easier way to solve this? If no I would like some arguments as to why it may be difficult to avoid all of the calculations.

1

There are 1 best solutions below

1
On BEST ANSWER

Since $2010$ is divisible by $3$ but not by $9$ there are no solutions. Solutions are only possible if the prime factorisation has every prime of the form $4n+3$ appearing to an even power.