6. What is the sum of the digits of the largest 4-digit palindromic number which is divisible by 15 ? [Palindromic numbers read the same backwards and forwards, e.g. 7227.]
A 18
B 20
C 24
D 30
E 36
Solution: $\mathbf{C}$
A 4-digit palindromic number has the form deed where $\mathrm{d}$ and $\mathrm{e}$ are digits. This number is divisible by 15 if and only if it is divisible by both 3 and 5 . It will be divisible by 5 if and if only if $d$ is 0 or 5 , but the first digit of a number cannot be 0 , so $d$ is 5 , and the number has the form 5 ee5.
A number is divisible by 3 if and only if the sum of its digits is divisible by 3 . So $5 e e 5$ is divisible by 3 if and only if $10+2 e$ is divisible by 3 , that is, when e is 7,4 or 1 . So the largest 4 -digit palindromic number which is divisible by 15 is 5775 . The sum of the digits of 5775 is $5+7+7+5=24$.