TyrionLannister
How many ways are there to paint each of the integers 2, 3,...,9 either red, green, or blue so that each number has a different color from each of its proper divisors?
(A)144
(B)216
(C)256
(D)384
(E)432
2, 3, 5 and 7 are prime numbers so there are 3 ways of choosing a colour for each of them.
2 and 3 could be same colour or different colours.
In case they are the same colour, there are 3*1*3*3 ways of choosing the colours for 4 numbers. In this case, there are 2 options for 6.
In case they are different colours, there are 3*2*3*3 ways of choosing the colours for 4 numbers. In this case there is 1 option for 6.
So in either case, there are 3*1*3*3*2 ways of choosing the 5 numbers. This gives is 3*1*3*3*2*2 = 108
4 should not be the same colour as 2 so there are 2 ways of choosing a colour for it.
8 should not be the same colour as 2 and 4 so there is only 1 way of choosing a colour for it.
9 should not be the same colour as 3 so there are 2 ways of choosing a colour for it.
Total number of ways of choosing colours for all 8 numbers = 108*2*1*2 = 432
Answer (E)