P is a prime number greater than 30. When P is divided by 30, the remainder is x. How many different values of x are possible?
A. 1
B. 3
C. 5
D. 7
E. 8
Imagine first that you get a remainder of 3 when you divide P by 30. That would mean P = 30q + 3, where q is some integer (the 'quotient'). But notice then that P = 3(10q + 1), so P is definitely divisible by 3. So P cannot be prime, and 3 cannot be our remainder here.
That will happen for any remainder that shares a divisor (besides 1) with 30. So the remainder here cannot be 2, 3, 4, 5, 6, 8, 9, 10, etc. It can only be a number between 1 and 29 inclusive that shares no non-trivial divisor with 30 (in math-speak, the remainder and 30 must be 'relatively prime'). So the possibilities are 1, 7, 11, 13, 17, 19, 23, and 29, for eight values in total.
If you wanted to confirm that every one of these values is possible, in most cases we can just add each remainder to 30 to find a candidate value of P: the numbers 31, 37, 41, 43, 47, 53 and 59 are all prime, so all could be equal to P here, and that gives us seven different remainders. The number 49 is not prime, but if we instead look at 60+19 = 79, we then get a prime number with a remainder of 19 when we divide by 30, so all eight of these remainders are possible.