# How many ways to get at least one pair in a seven card hand?

This was the question and answer I saw: How many different seven-card hands are there that contain two or more cards of the same rank? Solution: There are C(52,7) total hands. To subtract the ones that don’t have pairs, we observe that such hands have cards of 7 different ranks, and there are C(13,7) ways to select those. Then there are 4 choices for each card. So: C(52,7) – C(13,7) · 4^7

But my solution was 13·C(4,2)·C(50,5), as you choose which rank is the pair (13 ways to do this), then choose which two cards are the pair out of that rank(4 choose 2), and then you choose the remaining 5 cards from the rest of the 50 (50 choose 5). But these two do not give the same number. Am I going wrong somewhere with my alternate solution?

Consider a hand which has two pairs, for example $$\clubsuit A,\,\diamondsuit A,\,\heartsuit 10,\diamondsuit10,\,\spadesuit7,\,\spadesuit K,\,\diamondsuit 2.$$ Your method will count this hand twice:
• choose ace, then clubs and diamonds, then $\heartsuit 10,\diamondsuit10,\,\spadesuit7,\,\spadesuit K,\,\diamondsuit 2$; or
• choose $10$, then hearts and diamonds, then $\clubsuit A,\,\diamondsuit A,\,\spadesuit7,\,\spadesuit K,\,\diamondsuit 2$.