Math Help - Couldn't solve this one

1. Couldn't solve this one

Positive integers $a, b$ are both relatively prime and less than or equal to 2008. $a^2 + b^2$ is a perfect square.
$b$ has the same digits as $a$ in the reverse order. The number of such ordered pairs $(a, b)$ is _________ .

I started with 2 digits:
Let $a=xy$ and $b=yx$

$(10x+y)^2 + (10y+x)^2$
$101x^2 + 40xy + 101y^2$
which can't be factorized and isn't a perfect square.

Tried the same with 3 digits and ended up with this:
$10001x^2 + 200y^2 + 10001z^2 + 400xz + 2020xy + 2020yz$
This also isn't factorizable.

I've simply got no idea of how to proceed from here.

2. There simply is NONE. You sure your question is CORRECTLY worded?

3. Originally Posted by Wilmer
There simply is NONE. You sure your question is CORRECTLY worded?
Dunno, someone challenged me to solve it. Guess it was his idea of a joke.
My Apologies..

4. I am not sure but my answer is zero !

It is a famous property ( which is not what i am confused ) , $a-b \equiv 0 \bmod{9}$ , the proof is as follows :

Let $a = \sum_{i=0}^n a_i 10^i ~~ a_i \in \{\ 0,1,2,...,9 \}\$

so $b = \sum_{i=0}^n a_i 10^{n-i}$ and $a-b = \sum_{i=0}^n a_i ( 10^i - 10^{n-i} ) \equiv \sum_{i=0}^n a_i ( 1-1) \bmod{9} \equiv 0 \bmod{9}$

We have $a^2 + b^2 = c^2$

Since $a,b$ coprime , they can be expressed as $m^2 - n^2 ~,~ 2mn$ , wlog let $a = m^2 - n^2 ~ b = 2mn$ so we have

$a-b = m^2 - 2mn - n^2 \equiv 0 \bmod{9}$

$(m-n)^2 - 2n^2 \equiv 0 \bmod{9}$

I consider the form $x^2 - 2y^2$ whether it can be the multiple of $9$

Be caution the quadratic residues are $[R] = \{\ 0,1,4,7 \}$ so $2[R] = \{\ 0,2,8,14 \}= \{\ 0,2,5,8 \}$ , since the intersection of the sets is just $\{\ 0 \}$ , we conclude $x^2 - 2y^2 \equiv 0 \bmod{9}$ iff $x \equiv y \equiv 0 \bmod{3}$ . Therefore , $m-n \equiv n \equiv 0 \bmod{3} ~ \implies m \equiv n \equiv 0 \bmod{3}$ which is false because , $(a,b)=1 \implies (m,n)=1$ so we can never find out any odered pair $(a,b)$ .

EDIT: I have made it more complicated , in fact we can consider the quadratic residues from here :

$a^2 + b^2 = c^2$

It is easy to show $a \equiv b \bmod{9}$ since we have already proved that $a - b \equiv 0 \bmod{9}$ , so we have :

$2a^2 \equiv c^2 \bmod{9}$ consider the residues as i mentioned .

5. Originally Posted by simplependulum
EDIT: I have made it more complicated , in fact we can consider the quadratic residues from here :
$a^2 + b^2 = c^2$
We could simply apply the "pythagorean triplet" rules, couldn't we, SimpleP ?