## 10…08 is divisible by 18

I recently had occasion to learn that 108 and 1008 are both divisible by 18.

Which led me to wonder whether any integer consisting of 1 followed by some number of 0s followed by 8 is divisible by 18.

And in fact it turns out to be, and I came up with two fun proofs of that fact.

### First proof

The quick test to see whether an integer is divisible by 9 is to add up the digits. If the digits add up to 9 (or a multiple of 9), then the original number is divisible by 9.

And 1 + 8 = 9, so any integer consisting of a 1, an 8, and some 0s is divisible by 9.

Also, all integers ending in 8 are even. And if a number is even, then it’s divisible by 2, by definition. And a number that’s divisible by both 9 and 2 is divisible by 18.

Thus, all numbers of the form 10…08 (where the “…” indicates any number of 0s) are divisible by 18.

### Sidebar

Even though I’ve known the digits-add-up-to-9 thing forever, I wanted to prove it to myself. So here goes:

Saying that an integer is divisible by 9 is the same as saying it’s equivalent to 0 mod 9. You can think of a given positive integer as consisting of a set of numbers that are less than ten, each multiplied by a different power of 10; for example, 1,233 is 1 x 10^3 + 2 x 10^2 + 3 x 10^1 + 3 x 10^0. But every power of 10 is 1 mod 9, so any positive integer of the form n x 10^m is equivalent to n mod 9. (For example, 100 is 1 mod 9 (because it’s 99 + 1), so 200 is 2 mod 9 (because it’s (1 mod 9) plus (1 mod 9))).

So the original integer is equivalent to 0 mod 9 if and only if the sum of the digits is equivalent to 0 mod 9.

### Second proof

Any integer that consists entirely of a string of 9s is obviously divisible by 9. (It’s equal to 9 times a number that’s a string of 1s.)

And if you take an integer of the form 99…99 and add 9 to it, you get an integer of the form 10…08.

Since 99…99 is divisible by 9, adding 9 to it gives you another number that’s still divisible by 9, and since 10…08 is even, it’s also divisible by 18.