Concept:Numbers between 5000 and 9000 are 4‑digit numbers starting with 5 or 9. For divisibility by 3, the sum of digits must be a multiple of 3.
Explanation:Let the number be
5abc or
9abc where
a,b,c∈{0,1,2,5,9}.
We need
5+a+b+c (or
9+a+b+c) divisible by 3.
Since
5≡2(mod3) and
9≡0(mod3), for the 5‑starting case we require
a+b+c≡1(mod3); for the 9‑starting case we need
a+b+c≡0(mod3).
But both cases can be handled together by considering the remainder of
a+b and then choosing
c to make the total sum of the three digits satisfy the required remainder.
Count the ordered pairs
(a,b) by remainder of
a+b modulo 3, then multiply by the number of
c choices that give the desired total remainder.
The table below lists all possibilities.
Total numbers =
8+16+18=42.
Answer:42 (Option A)