Skip to main content
OlympiadHQ

Browse · harp

Print

jmc

number theory junior

Problem

A number is called flippy if its digits alternate between two distinct digits. For example, and are flippy, but and are not. How many five-digit flippy numbers are divisible by
(A)
(B)
(C)
(D)
Solution
A number is divisible by precisely if it is divisible by and . The latter means the last digit must be either or , and the former means the sum of the digits must be divisible by . If the last digit is , the first digit would be (because the digits alternate), which is not possible. Hence the last digit must be , and the number is of the form . If the unknown digit is , we deduce . We know exists modulo because 2 is relatively prime to 3, so we conclude that (i.e. the second and fourth digit of the number) must be a multiple of . It can be , , , or , so there are options: , , , and .
Final answer
B