I'm having some trouble with the following modified version of the birthday problem: Calculate the expected value for the number of people questioned until the first match in the birthday problem, write it (python is preferred), and explain the algorithm used.
So I've gotten as far the simulated probability (for a fuller understanding) which is roughly $24$ and change. I know that the basic idea is to product sum $[365/365]*[1/365]*[(1/365)(364/365)(2/365)]...[n/365]$ where you begin counting matches from person $2$ on up. Also it's an expanding series, which is awkward to translate from paper math to code.
The actual program is not long but the resulting numbers are too large and causing errors in running. I'm wondering if the expected value differs from the simulated (from random values) and why?
If anyone would be nice enough to give me a good idea on how this works I'd appreciate it.