MOG 2017 Q2
A positive integer is said to be jiggly if it has four digits, all non-zero, and no matter how you arrange those digits you always obtain a multiple of 12.
How many jiggly positive integers are there?
Mathematical Olympiad for Girls 2017, Question 2. © UK Mathematics Trust. Original paper on ukmt.org.uk
Answer: 6
Commentary
To solve this problem you need to know various divisibility criteria. For an integer to be a multiple of 12 it needs to be a multiple of both 3 and 4. An integer is a multiple of 3 if the sum of its digits is a multiple of 3. It is a multiple of 4 if it ends in a two-digit number which is a multiple of 4. (Have you ever tried to prove these divisibility criteria?)
Probably the first thing to notice is that all the digits must be even (because any rearrangement must end in an even digit). There aren’t very many two-digits multiples of four which are made up of two even digits; checking them all shows that the only possibilities where both ‘\(ab\)’ and ‘\(ba\)’ are multiples of 4 are 44, 48, 84 and 88. Hence each digit is either 4 or 8.
You then need to check which combinations of four such digits have a sum which is a multiple of 3, and then count how many different four-digit numbers can be made from those digits.
Since rearrangement always gives an even integer, all the digits must be even. Numbers ending ‘\(a\)2’ or ‘\(a\)6’ are not divisible by 4 when \(a\) is even. Therefore all the digits must be multiples of 4, that is, every digit is either 4 or 8. A number is divisible by 3 if and only if the sum of its digits is divisible by 3. Therefore, if the number is to be divisible by 12 then neither 4 nor 8 can occur 3 times or 4 times, and so it is an arrangement of 4488, of which there are 6. Thus there are precisely 6 jiggly positive integers.
Note
In this case, the number of arrangements of the digits 4488 is sufficiently small for you to write out and count all of them. If you know about combinatorics, you can also calculate it as \(\tfrac{4!}{2!2!}\).
Solution © UK Mathematics Trust, from the MOG 2017 solutions.