## Le Monde problem on PIN number

Now that the new school year has started, Christian Robert has picked up solving the Le Monde mathematical puzzles using R again, which leads me to solving them without R… Last week-end’s puzzle is:

Alice’s PIN number is made of four different non-zero digits. She remembers it by noting that when she sums all two-digit numbers that can be made out of those four digits, and multiplies this sum by 7, she gets her PIN number back.

If the PIN number is written $\overline{abcd}$, it is easy to check that the sum computed by Alice is equal to $33*(a+b+c+d)$. Thus $\overline{abcd}=231*(a+b+c+d)$.

The sum $(a+b+c+d)$ can take values between 10 and 30. Since 231 is divisible by 3, so is $\overline{abcd}$. Hence (by the rule used to check for divisibility by 3), $(a+b+c+d)$ is divisible by 3. This makes $\overline{abcd}$ divisible by 9, and so (by the rule used to check for divisibility by 9) $(a+b+c+d)$ is also divisible by 9.

The only possible values for $(a+b+c+d)$ are 18 and 27. It turns out that the only value which works is 18. Hence the PIN number is $18 \times 231 = 4158$ (and the sum of those four digits is indeed equal to 18).