We can count how many elements of S are divisible by 3 without enumerating (listing) them. This is given by .
is the number of ways to choose at least one of these 7 elements. We can choose the remaining 14 elements in ways. So the answer is .
Equivalently, note that there are subsets that do not contain any of those seven elements, then subtract that from .
c) Do you see why this is simply ?
d) I actually think the wording on this problem could be better. If a subset contains 7 but not 9 or 15, do we count it or not? If yes, then we take (answer from a) - (answer from c) like you said. If no, then the answer is again .
e) Can you see how to do this now?