divisibility test let $n=a_m 10^m+a_{m-1}10^{m-1}+\dots+a_2 10^2+a_1 10+a_0$, where $a_k$'s are integer and $0\le a_k\le 9$, $k=0,1,2,\dots,m$, be the decimal representation of $n$
let $S=a_0+\dots+a_m$, $T=a_0-a_1\dots+(-1)^ma_m$
then could any one tell me how and why on the basis of divisibility of $S$ and $T$ by $2,3,\dots,9$  divisibility of $n$ by $2,3,\dots,9$ depends?
I am not getting the fact why we introduce $S,T$
same question $n=a_m (100)^m+a_{m-1}(1000)^{m-1}+\dots+a_2 1000^2+a_1 1000+a_0$,
$0\le a_k\le 999$

If $m=1$ then $S$ and $T$ uniquely determine the number.  In any case $S$ determines the number mod $3$ and $9$, and $T$ determines the number mod $11$, as André pointed out.  Unfortunately, as André also pointed out, even the combination of $S$ and $T$ does not generally determine divisibility by any of the numbers $2,4,5,6,7,$ or $8$.  
Here are some examples with $m=2$: 


*

*$336$ and $633$ have the same $S$ and $T$, but the first is divisible by $8$ (and hence by $2$ and $4$) and also by $6$ and $7$, while the other is not divisible by any of those $5$ numbers.

*$105$ and $501$ have the same $S$ and $T$, but the first is divisible by $5$ and $7$, while the other is not divisible by either of those numbers.

