Divisibility criteria

A divisibility criterion for a number is a rule which quickly allows us to check if a number is divisible by . Of course, one can always divide into and verify that that there is no remainder, but that is a very tedious operation.

We are looking for something much quicker, a condition one can almost check in a single glance. Usually these tricks are expressed in terms of the digits in decimal expansion. For example, a number is divisible by 10 if it ends in a 0 (in its decimal expansion).

Searching for divisibility criteria

Find a divisibility criterion for 2.

Find a divisibility criterion for 5.

Find a divisibility criterion for 4.

Find a divisibility criterion for 8.

Find a divisibility criterion for 3.

Find a divisibility criterion for 9.

Find a divisibility criterion for 11.

Find a divisibility criterion for 7.

All ones

Find the smallest positive integer such that the decimal expansion of contains only ones.

The aim of this problem is to find the smaller number whose digits are only ones, that is multiple of . But being multiple of 99 is the same as being contemporarily multiple of 9 and 11. So, let us apply the criteria we found in the previous exercise. For the number

to be multiple of 9, we need the sum of the digits to be too. But the sum of the digits is just , so we need to be divisible by 9. In order to have our number multiple of 11, we need the alternating sum of digits to be multiple of 11. But the alternating sum of digits is 0 whenever is even, and 1 when it odd, so we just need to be even.

Wrapping up, we need the smallest that is both multiple of and even, so the answer is just 18. We have in fact

Missing digits 1

The number is a multiple of 99. Find the digits and .

As in the previous exercise, we want the sum of digits to be multiple of , and the alternating sum to be multiple of .

The sum of digits is just , and we want it to be multiple than 9. We know that is the sum of two digits, so that it can be only a number between 0 and 18. Hence, the only multiples of 9 that the sum of digits can achieve are 27 and 36, so that we have that becomes

Similarly, the alternating sum is , and we want it to be multiple of 11. The difference can only be a number from to , so that the only multiples of 11 achievable from the alternating sum of digits are and . We have that becomes

So, we have possibilities for and two for , that give 4 linear systems in and that we need to solve. But instead of doing this, let us be clever. If , this automatically means and (because and are digits), but this doesn't fit with any of the two possibilities for . So, the difference has to be . Plugging in in the two equations for the sum , we get from the first equation (and then ) and from the second that is impossible. The number is then

Missing digits 2

Suppose . Find the digits , , , and .

Using formulas from the previous sections, the number of zeroes at the end of is so we immediately get that and have to be zero. Then, to find and , we can apply the same argument as in the previous exercise, because we know that is also going to be multiple of 99. In the exact same way, we get and , so that

Sum the digits!

Let denote the sum of the decimal digits of . Consider the following recursive sequence What is the behavior of the sequence for large ? Can you find its limit? How soon is it achieved?