Let S be the set of all 12-digit positive integers each of whose digits is either 1 or 4 or 7 (for example, 477411171747 is a member of S). What is the probability that a randomly picked member of S is divisible by 12 ?
For a number to be divisible by twelve it must be divisible by $4$ and $3$.
Also the divisibility rule for a number to be divisible by $4$ is that its last two digits must be divisible by four.
Also for three is that its sum of digits is a multiple of $3$.
Can you take it from here?
Hint 1: A number is divisible by $12$ if and only if the sum of its digits is divisible by $3$, and the last two digits are divisible by $4$.
Hint 2: $1,4,7$ are all congruent to $1 \pmod 3.$
Thanks for the hint.
So, 11 cannot be divisible by 4 and 77 cannot be divisible by 4 means the last two digits should be 44.
Further 1 = 1 (mod 3), 4 = 1 (mod 3) and 7 = 1 (mod 3) then any combination of 12 digit numbers of 1, 4, 7 and its sum will be 0 ( mod 3).
Then coming to the crux of the problem, No of number 12 digit numbers with 1, 4 and 7 is 3^12 ( with repetition allowed) goes to the denominator and No of 12 digit numbers with 44 as the last two digits is 3^10 goes to the numerator
Thus the required probability is 3^10/3^12 = 1/9.
Thanks guys for the hints and just let me know that this correct.