1. ## Divisibility Tests

I would like some help in finding the divisibility tests for when integers are divisible by 4 and 8.

The hint given in the book is to write the integer as:
N=100M+10P+R=10P+R (Mod 4). I'm unclear about where this comes from or how it helps me in answering the question. Help would be greatly appreciated.

2. Originally Posted by free_to_fly
I would like some help in finding the divisibility tests for when integers are divisible by 4 and 8.

The hint given in the book is to write the integer as:
N=100M+10P+R=10P+R (Mod 4). I'm unclear about where this comes from or how it helps me in answering the question. Help would be greatly appreciated.
This tells you that an integer is divisible by 4 if the number made from the two least significant digits is divisible by 4.

This is true because if N is the number M the number made from the two least significant digits, then:

N=100k + M

for some integer k. But 100 is divisible by 4, hence N is divisible by 4 if and only if M is divisible by 4.

RonL

3. Hello,

Same goes for divisibility by 8.

N=1000k+M.

1000 is divisible by 8, so N is divisible by 8 iff M is divisible by 8.

We can go further & use the hint given.
N=100M+10P+R (mod 8)
If M is even, then 100M is divisible by 8 (check it out), and then we'll care only about the 2 last digits.
If M is odd, then...