chetan2u, I calculated it differently.
P=28X+Q, where 0<Q<28.
1.Q can not be equal to 0 as then, P=28X and will have 2,7 as factors. Hence, P will not be a prime number.
2. Also, since the remainder is always smaller than the divisor, then Q<28.
Since, Q can not share any common factor with 28. It must not have 2 and 7 as prime factors.
So, total possible values of Q is 27. (1,2,3...27)
numbers with 2 as factor-13 (2,4,6...26)
numbers with 7 as factor-3 (7,14,21)
numbers with both 2 and 7 as factors-1 (14)
So, total number of possible values of Q = 27-(13+3-1)= 12 (Ans)
chetan2u
So \(P=28x+Q\)...
As Q is a remainder, it has to be <28.
Now if Q shares a common factor with 28, P will also be multiple of that factor and, therefore, will not be a prime number..multiples of 2 till 28 ---
14 in numbermultiples of 7 till 28 ---
4 in numbermultiple of both 2 and 7 --
2 in number (
14 and 28).. these are common to both 14 and 4.
Thus remaining possibilities of Q = 28-14-4+2=12
C