$N$ is divisible by $5$ iff $a_0=0$ or $5$

156 Views Asked by At

The problem says that $$N=a_m.10^m+a_{m-1}.10^{m-1}+...+a_1.10+a_0$$ is divisible by $5$ iff $a_0=0$ or $5$.

Here is my approach.

It's obvious that $a_0$ must be $0$ or multiple of $5$. I have shown, $$N=a_m.10^m+a_{m-1}.10^{m-1}+...+a_1.10+a_0\equiv a_0\mod 5\\ \Rightarrow N\equiv a_0 \mod 5\\ \therefore N-5=a_0\\ 10.m-5=a_0$$, where $N=10.m$.

Putting $m=1,2,3,..$ etc we get $a_0=5$. It is obvious $a_0=0$ also. Hence the proof.

Now here I have doubt. is it correct to assume $N=10.m$? I am not sure. Please correct me if I'm wrong. Any alternative approach will also be helpful.

3

There are 3 best solutions below

1
On BEST ANSWER

It should be $$N\equiv a_0\pmod5\implies a_0-N\equiv a_0\equiv0\pmod5$$ as $5\mid N$. Otherwise, your solution is fine.


More concisely,

If $a_0=0,5$, then $$N=a_m\cdot10^m+a_{m-1}\cdot10^{m-1}+\cdots+a_1\cdot10+a_0\equiv0\pmod5$$ Conversely, if $5\mid N$, then $$5(a_m\cdot2^m\cdot5^{m-1}+a_{m-1}\cdot2^{m-1}\cdot5^{m-2}+\cdots+a_1\cdot2)+a_0\equiv0\pmod5$$ Hence $a_0\equiv0\pmod5\implies a_0=0,5$ as $0\le a_0<10$.

4
On

i would write $N\equiv 0 \mod 5$ and this can be written in the form $$N=a_0+5m$$ where $m$ is integer number.

1
On

It has a quite straightforward solution.

$N$ is divisible by $5$, so $N=5k$. The right-hand expression can be written as $(5\lambda+a_0)$. Hence, $a_0 = 5(k-\lambda)=5 \gamma$, where $k, \lambda$ are integers.