Divisibility by 8

Rule for Divisibility by 8
A number with at least 3 digits is divisible by 8 if its last three digits form a number divisible by  8.

Examples
A.) 7,120 is divisible by 8 because its last three digits, 120, form a number divisible by eight.
B.) 9,389 is not divisible by 8 because its last three digits, 389, form a number not divisible by eight.

Proof

For any integer x written as anan-1an-2...a2a1a0, we will show that x is divisible by 8 if a2a1a0 is divisible by 8.

If we write x as anan-1an-2...a2a1a0, then we can also write:

x= a0 + a1(10) + a2(102 )+ a3(103)... + an-2(10n-2) + an-1(10n-1 ) + an(10n)

        = (an×10n + an-1×10n-1 + an-2×10n-2 + .... + a3)×1000 + a2a1a0

        = 8×125× (an×10n + an-1×10n-1 + an-2×10n-2 + .... + a3) + a2a1a0


Since the term 8×125×(an×10n + an-1×10n-1 + an-2×10n-2 + .... + a3) is divisible by 8, the integer anan-1an-2 ....a2a1a0 is divisible by 8 if and only if the number a2a1a0 is divisible by 8 and vice versa.
Comments