Your question should be considered like this:
Suppose you randomly select and remove three cards with distinct ranks from a standard deck of 52 playing cards. What is the probability that at least one of the top three cards left in the deck matches one of the removed cards' ranks?
...which can then be thought of as
Suppose you randomly select and remove three cards with distinct ranks from a standard deck of 52 playing cards. What is the probability that at none of the top three cards left in the deck matches one of the removed cards' ranks?
As these two events are complementary, you can find the probability of either event and you will immediately know the other (they have to add up to 1).
So, what is the probability of missing the flop? It is the probability that the first card doesn't match, AND the second card doesn't match, AND the third card doesn't match. We therefore have 40/49 * 39/48 * 38/47, or approximately 0.5363, which means that the probability of at least one card matching is approximately 0.4637.
Now, if you could select three card ranks with no restriction (that is, they need not be distinct), the calculation is a little different. On top of that, there are selections and flops that, in poker, would count as flopping at least one pair (e.g. two pair, three of a kind, straight, flush, etc. are all hand rankings that are better than one pair).
If this is truly a math problem outside of this application, then perhaps visiting math.SE is a great place to start. I'll see you there!