# Since 324 ≡

# 1 (mod 5) we have

324^{3847 }

≡ ( 1)^{3847 }

=

1≡4

(mod 5)

and so the remainder is 4.

# 3

# The Divisibility Tests

In our base 10 number system, the number a composed of the digits a , a , a_{1}, a_{0 }read from left to right can be written as the sum

_{1},

a = 10 a + 10

^{1}a

1

+

· · · + 10a

_{1 }+ a_{0 }

(1)

Our standard method for testing the divisibility of a by d is to reduce the above sum modulo d and see what information we get.

# For ease of notation, we will write [a a

whose (base 10) digits are a , a

_{1},

, a_{1 }

1 a 1 a 0 ] t o d e n o t e t h e n u m b e r , a_{0 }from left to right. In other

w o r d s , t h e s u m i n e q u a t i o n ( 1 ) . T h u s , i f a = 2 7 1 8 = [ a 3 a 2 a 1 a 0 ] , t h e n [ a 3 a 2 ] =

27. We will often use the fact that [a a

1

a 1 a 0 ] = 1 0 n [ a a

1

a_{n}] +

[a_{n }

1

a_{0}].

3.1

Examine the Ending Digits

It is exceedingly easy to test if a number a is divisible by 2; simply see if the last digit of a is divisible by 2. The same test works when determining divisibility by 5 or 10. As another example, it turns out that if you want to test divisibility of a by 8, you only need to check if the last three digits of a are divisible by 8.

4