## Ken's POTW

Dividing by 111
Tests for divisibility exist for small numbers:
- A number is divisible by 3 if the sum of its digits
is divisible by 3. For example: 224055; 2+2+4+5+5=18, which is
divisible by 3.
- A number is divisible by 4 if the last two digits are 00
or are divisible by 4.
- To test if a number is divisible by 7, take the last digit,
double it, and subtract it from the remaining digits. Repeat
until you can tell if the number is divisible by 7.
For example: 59983; 5998-6=5992; 599-4=595; 59-10=49, which is
divisible by 7.

So my puzzle is this:
- Find a test for divisibility by 111.
- Extending this, find a test for divisbility by any number consisting
solely of 1's.

Please explain why your tests work.
Source:
An original extension of
UofCF's Problem of the Week ending 11/9/97.

Solution

Mail to Ken