# $N$ be a natural number consisting all digits except $0.$ If the last digit of $N$ is 5 then prove that $N$ can't be a perfect square.

Let $N$ be a nine digited natural number consisting all digits except $0.$ If the last digit of $N$ is 5 then prove that $N$ can't be a perfect square.

I have have tried finding a prime $p$ dividing $N$ but $p^2$ not dividing $N$ but I am unable to do it that way. Also I found that ten's digit of $N$ can be $2$ or $7.$

Any help will be appreciated.

• Due to the congruent of perfect squares $\bmod4$, the number must end with either one of $[25,45,65,85]$. This leaves you with $7!\cdot4=20160$ values which you can check manually (though I'm pretty sure that there's a better approach). Nice question! – barak manos Sep 8 '16 at 8:28

Tip: the last digit of $N$ is $5$, so $\sqrt N$ must also end with $5$, but if that's the case, the tens digit of $N$ must be $2$, since no perfect square ends with $75$, but if that's the case...

• I can't understand how it will work? – user333900 Sep 7 '16 at 16:06

Let P be that number. After dividing by 5, u get Q. Now Q cannot contain 5. So Q doesn't have 5 as a factor. So Q times 5 cannot be a square as a square should have prime factors of order 2.

Edit: Using the following facts which can be proved individually.

• perfect square ending in 5, will also end in 25.
• perfect square ending in 25 will have either 0,2,6 in hundred's place.
• perfect square ending in 625, will have 0,5 in thousand's place.

so the number N, for it to be perfect square, should end in 625( it cant have 2 or 0 in hundred's place). After that it cant have eihter 0 or 5 in thousand's place. so N is not a perfect square.

• It looks like your $P$ is OP's $N$. Why can't $P/5$ contain $5$? If $P$ ends in $25$ or $75$ it will. – Ross Millikan Sep 7 '16 at 14:55
• 134678925=26935785*5 = 5387157*25. – fleablood Sep 7 '16 at 15:17