Over the holidays I played a dice game where each player had 3 to 7 d6 to roll each turn. The game gave certain advantages to doubles and triples. I wanted to know the odds of rolling doubles or triples given N dice to understand the importance of "upgrading" to more dice.
My question is really about how to reason about such problems: It's easy to see that the odds of rolling doubles with 2 d6 are 1/6 (first die can be anything, and 1/6 of the time the second will match). It's also easy to see that with 7 dice the odds are 1.0 (6 dice could be 1..6, but the 7th must match one of them). The middle cases are fuzzier to me.
I ended up writing a program to enumerate all of the possibilities (even 6^7 is only 279,936 cases to evaluate) because that was the only way I felt I could verify any closed formula I came up with. This also enabled me to distinguish cases of multiple doubles (or triples). I would like to know how to derive closed forms and how to validate such solutions without brute-force simulation.