How to prove that a number $n$ is divisible by $2^k$, if taking at most last $k$ digits of the number together, let it be $m$, is divisible by $2^k$ ?
For example :
let $n = 3^{10} * 2^5$,
or $n = 5668704$,
then by taking last $5$ digits only, I can check the divisibility by $2^5$,
i.e. we find that since $m = 68704$ is divisible by $2^5$,
$n$ is also divisible by $2^5$,
how to prove this mathematically?
Can this be extended for any other divisor like $3$ or $7$ and so on?
How to prove that a number $n$ is divisible by $2^k$, if taking at most last $k$ digits of the number together, let it be $m$, is divisible by $2^k$?
1k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
This is something you actually already know, at least in particular examples: "$n$ is divisible by $2$ if and only if the last digit of $n$ is divisible by $2$."
This is easy, $n = 10k + l$ and so $n\equiv 10k + l \equiv l \pmod 2$. This is becuase $2$ divides $10$.
Notice that $4$ doesn't divide $10$, so the same rule doesn't apply. For example, $4$ divides $16$, but not $6$ and the other way around, $4$ divides $4$, but not $14$.
However, $4$ divides $100$. So, $n = 100k + 10m + l$ implies $n\equiv 10 m + l\pmod 2$, the last two digits.
By induction, $2^k$ divides $10^k$, so a number is divisible by $2^k$ if and only if its last $k$ digits are.
The key property here is that $2$ divides the base of the decimal system, $10$. The same rule applies to $5^k$, but to no other prime. The same rule works for $10^k$ as well, but you know it in another form: "a number is divisible by $10^k$ if and only its last $k$ digits are $0$."
If you used base $b$ instead of base $10$, the same rule would apply for any divisor $d$ of $b$. Think of extreme example like binary. The only divisor apart from $1$ of the base $2$ is $2$ itself. And think about it, what can you tell about divisibility from the last digit of number in binary? Only whether it's even or odd.
On
1) If $m | a$ and $m|b$ then $m|a+b$
2) And if $n|m$ and $m|a$ then $n|a$.
And so if a) $n = zyxw.......dcba = 10^k(zyxw.....onm) + (kjih....dcba)$
And we know for a fact X) $2^k | 10^k = 2^k\times 5^k$.
........
So that's it.
....
$10^k|10^k(zyxw.....onm)$ and $2^k|10^k$. So $2^k|10^k(zyxw.....onm)$.
So if $2^k|kjih....dcba$ then we know $2^k|10^k(zyxw.....onm)$ so $2^k|10^k(zyxw.....onm) + (kjih....dcba)=zyxw.......dcba=n$.
The key here is that $10^{k}$ is divisible by $2^k.$ So if we write the number as $$ n= m+l$$ where $l$ is the last $k$ digits, we know that $m$ is a multiple of $10^k$ (since its last $k$ digits are zero), so $2^k$ divides $m$. So if $2^k$ divides $l$, it divides $n$.
This same reasoning will tell you the result holds for $5^k$.