# Secret Number Trick # 1

**Everybody** knows how to spot whether a number is divisible by 2, and most people learn how to tell whether a number is divisible by 3, 4, 5, 6, 8, 9 or 10.

But **what about 7**? Is it so difficult to figure out whether a number is divisible by 7? **NO!**

Suppose you are given a number *N*. To check divisibility of *N* by 7:

- Take the
**last digit**of*N*and**double it**. **Subtract**this value**from**the number formed by considering.*N*without its last digit- Check if 7 divides this. If so, then 7 also divides
*N*, otherwise it doesn’t. (Tiny technicality: Note that 7 divides 0, as 0*7=0.)

The way I memorize this is by chanting the mantra “*double and subtract, double and subtract, double and subtrac*t”. Make sure that you subtract from *N* **without** its last digit, instead of just *N*.

For **example**, take 8162. Is this divisible by 7?

- The last digit of 8162 is 2.
**Doubling**this gives 4. **Subtracting**4 from 816 gives 812.- Is 812 divisible by 7? Run the method again:
- The last digit of 812 is 2.
**Doubling**this gives 4. **Subtracting**4 from 81 gives 77.- 77 is divisible by 7.

- The last digit of 812 is 2.

We conclude that 8162 is divisible by 7.

For a proof and a generalization of this method to all odd prime numbers, check out this document.