Divisibility by 4

Rule for Divisibility by 4

A number is divisible by 4 if the last two digits of the number are divisible by 4 .

Examples

A.)2,234,489,032 is divisible by 4 because its last two digits, 32, form a number divisible by 4.

B.) 789,079 is not divisible by 4 because its last three digits, 79, form a number not divisible by 4.

Proof

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

If we write x as anan-1an-2...a1a0, 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 + .... + a2)×100 + a1a0

= 4×25× (an×10n + an-1×10n-1 + an-2×10n-2 + .... + a2) + a1a0

Since the term 4×25×(an×10n + an-1×10n-1 + an-2×10n-2 + .... + a2) is divisible by 4, the integer anan-1an-2 ....a1a0 is divisible by 4 if and only if the number a1a0 is divisible by 4 and vice versa.

Below is an alternate proof using modular arithmetic.