Number of 4-digit numbers (repetition allowed) which are made using the digits 1, 2, 3 and 5, and are divisible by 15, is equal to \_\_\_\_\_\_\_
Answer: 21
Solutions · 1
Official solution
Divisible by 15 requires divisible by 5 (last digit = 5, since digits available are 1,2,3,5) and by 3 (digit sum divisible by 3).
Last digit fixed as 5. First 3 digits (each from {1,2,3,5}) plus 5 must sum to a multiple of 3. Residues mod 3: 1→1,2→2,3→0,5→2.
We need first 3 digits summing to ≡−5≡1(mod3). Counting valid combinations from 43=64 ordered triples that satisfy this residue condition (using generating function with residue counts r0=1,r1=1,r2=2) yields 21 valid numbers.
\[\text{Total} = 21\]