Tricks and Tips

Wednesday, 26 February 2014

General Proof of Divisibility Tests

Here is a basic fact: Suppose you have a positive integer $n$  which, when you write its digits look liks : 

$a_m a_{m-1}\cdots a_2 a_1 a_0$

So  $a_0$  is the digit in the unit place,    $a_1$  is the digit in the 10's place,  $a_2$  is the digit in the 100's place, etc.   Then the number  $n$ equals

$n=a_m 10^m + a_{m-1} 10^{m-1}+ \cdots+a_2 10^2 + a_1 10 + a_0$, where $a_k$ are integers  and  $0\leq a_k \leq 9, k=0,1, ..., m$.

Let $S=a_0+a_1+ \cdots+a_m$,  $T= a_0-a_1+ \cdots+(-1)^m a_m.$  Then

(i)   $2|n \Leftrightarrow 2|a_0$;
(ii)   $3|n \Leftrightarrow 3|S$;
(iii)   $5|n \Leftrightarrow 5|a_0$;
(iv)   $9|n \Leftrightarrow9|S$;
(v)   $11|n \Leftrightarrow 11|T$.

Proof.

Let us consider  the polynomial

$f(x)=a_m x^m + a_{m-1} x^{m-1}+  \cdots +a_2 x^2 + a_1 x + a_0$.

(i)   We have

    $10 \equiv 0(\mod 2)$

$\Rightarrow f(10) \equiv f(0)(\mod 2)$

 $\Rightarrow n \equiv a_0 (\mod 2)$  ($\because f(10)=n$  and  $f(0)=a_0$)

 $\Rightarrow 2|(n-a_0)$.

 $\Rightarrow n-a_0=2q$ for some $q \in\mathbb{Z}$

$\Rightarrow n=a_0+2q$.

Hence  $2|n$ iff $2|a_0$.


Conclusion: An integer is divisible by $ 2$ if the digit in the unit place is even.


(ii)   We have

    $10 \equiv 1(\mod 3)$

$\Rightarrow  f(10) \equiv f(1)(\mod 3)$

 $\Rightarrow n \equiv S (\mod 3)$  ($\because f(10)=n$  and  $f(1)=S$)

 $\Rightarrow 3|(n-S)$.

$\Rightarrow  n-S=3q$ for some $q \in\mathbb{Z}$

$\Rightarrow  n=S+3q$

Hence  $3|n$  iff $ 3|S$.


Conclusion: An integer is divisible by $3$ if the sum of its digits is divisible by $3$.



(iii)   We have

    $10 \equiv 1(\mod 9)$

$\Rightarrow  f(10) \equiv f(1)(\mod 9)$

$\Rightarrow  n\equiv S (\mod 9)$  ($\because f(10)=n$  and  $f(1)=S$)

$\Rightarrow  9|(n-S)$.

$\Rightarrow  n-S=9q$ for some $q \in \mathbb{Z}$

$\Rightarrow  n=S+9q$.

Hence  $9|n$  iff  $9|S$.


Conclusion: An integer is divisible by $9$ if the sum of its digits is divisible by $9$.



(iv)   We have

    $10 \equiv -1(\mod 11)$

$\Rightarrow  f(10) \equiv f(-1)(\mod 11)$

$\Rightarrow  n \equiv T (\mod 11)$  ($\because f(10)=n$  and  $f(-1)=T$)
$\Rightarrow  11|(n-T)$.
$\Rightarrow  n-T=11q$ for some $q \in \mathbb{Z}$
$\Rightarrow  n=T+11q$.

Hence  $11|n$ iff $11|T$.

Conclusion : An integer in divisible by $11$ if  the difference between the sum of digits in the odd place and  the sum of the digits in the even place is divisible by $11$

No comments:

Post a Comment