# $5$ and $11$ divides a perfect square $abc0ac$. What is the number?

$5$ and $11$ divides a perfect square $abc0ac$. What is the number?

I started this way - expressing the number as $(10^5+10)a+(10^4)b + (10^3+1)c$
Which fooled me. How can I start?
P.S: This is a problem from BdMO-2016 regionals.

• 5 is a divisor, so the last digit must be 0 or 5. If c is 0, a must be 0, which is false, so c must be 5. Hence, a must be 2. So your task is to find out b. – Huang Dec 26 '16 at 12:40
• @Huang Why a must be 0 if c = 0? Didn't get this.. :| – Rezwan Arefin Dec 26 '16 at 12:41
• since $5$ is a divisor of this number – Dr. Sonnhard Graubner Dec 26 '16 at 12:42
• @RezwanArefin since it's a perfect square. It the ones digit is 0, the ones digit of its root must be 0, so the tens and ones digits are both 0 of that number. – Huang Dec 26 '16 at 12:45
• A natural number is a multiple of $\;11\;$ iff (the sum of its digits in even poisition) minus (the sum of its digits in odd position) is a multiple of $\;11\;$ . With this and knowing $\;c=5\implies a=2\;$ you can solve this at once. – DonAntonio Dec 26 '16 at 13:10

Because $25$ divides N it follows $ac \in \{ 00, 25, 50, 75\}$. Because $11$ divides N it follows that the alternating sum of the digits in the number is divisible by 11, therefore $11 | 2a -b$.
Now just take each possibility for $ac$
If the number is divisible by $5$ then $c=5$ or $c=0$. It cannot equal $0$ by Huang's comment. Therefore $c=5$ and because a perfect square ending in $5$ necessarily ends in $25$ we know that $a=2$.
If a number is divisible by $11$ then the alternating sum of its digits: $a-b+c-0+a-c=2a-b=4-b=11n$ (i.e. the sum must be a multiple of $11$). Because $0\le b \le 9$, then $n$ can only equal $0$, from which we know that $b=4$ and the number equals $$245025=495^2$$