# Thread: Couldn't solve this one

1. ## Couldn't solve this one

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

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

$\displaystyle (10x+y)^2 + (10y+x)^2$
$\displaystyle 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:
$\displaystyle 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 ) , $\displaystyle a-b \equiv 0 \bmod{9}$ , the proof is as follows :

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

so $\displaystyle b = \sum_{i=0}^n a_i 10^{n-i}$ and $\displaystyle 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 $\displaystyle a^2 + b^2 = c^2$

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

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

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

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

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

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

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

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

$\displaystyle 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 :
$\displaystyle a^2 + b^2 = c^2$
We could simply apply the "pythagorean triplet" rules, couldn't we, SimpleP ?