0
$\begingroup$

If "x" is a 9 digit number , which contains digits from 1 to 9 which ends in 5 . Prove that it can't be a perfect square ( digits are not to be repeated).

Please suggest the solution of this question.

$\endgroup$
8
  • $\begingroup$ The number must end in $25$ or $75$, but apart form that? Without the condition baout $5$, there are 30 such perfect squares, so I'm afraid this boils down to lots of case distinctions ... $\endgroup$ Apr 28, 2013 at 11:14
  • $\begingroup$ Please reformulate the question in a more understandable way. Do you mean "Prove that if $n$ is a $9$-digit number, containing all digits from $1$ to $9$, and ending in $5$, then $n$ cannot be a perfect square"? $\endgroup$ Apr 28, 2013 at 11:14
  • $\begingroup$ @Hagen: How can it end in 75? $\endgroup$
    – TonyK
    Apr 28, 2013 at 11:17
  • $\begingroup$ $(10x+5)^2=100x(x+1)+25\equiv25\pmod{100}$ $\endgroup$ Apr 28, 2013 at 11:24
  • 1
    $\begingroup$ @TonyK You are right (by the same reasoning) ;) $\endgroup$ Apr 28, 2013 at 11:54

1 Answer 1

11
$\begingroup$

Assume on the contrary that there is a $9$ digit number containing all digits from $1$ to $9$ and ending in $5$ which is a perfect square $m^2$.

Then clearly $m^2$ is odd and divisible by $5$, so $m$ is odd and divisible by $5$. $\frac{m}{5}$ is an integer, so $(\frac{m}{5})^2 \equiv 0, 1, 4 \pmod{5}$. Thus $m^2 \equiv 0, 25, 100 \pmod{125}$. Also $m^2 \equiv 1 \pmod{8}$, so combining gives $m^2 \equiv 625, 025, 225 \pmod{1000}$. Clearly $m^2$ cannot end with $025$ or $225$, so $m^2$ ends with $625$. This implies that $125 \mid m^2$, so $25 \mid m$, so $625 \mid m^2$. Now $m^2 \equiv 625 \pmod{5000}$, so $m^2 \equiv 0625, 5625 \pmod{10000}$, a contradiction.

Therefore a $9$ digit number containing all digits from $1$ to $9$ and ending in $5$ cannot be a perfect square.

$\endgroup$
4
  • $\begingroup$ How did you rule out $m^2 = 425$ and $m^2=825$ (mod $1000$)? $\endgroup$
    – TonyK
    Apr 28, 2013 at 11:54
  • $\begingroup$ @TonyK Because $m^2 \equiv 0, 25, 100 \pmod{125}$. $\endgroup$
    – Librecoin
    Apr 28, 2013 at 12:15
  • $\begingroup$ Sorry, my mistake. I read (mod $125$) as (mod $100$) for some reason. $\endgroup$
    – TonyK
    Apr 28, 2013 at 12:23
  • $\begingroup$ Brilliant! 10th upvote. $\endgroup$ Nov 30, 2013 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.