OFFSET
2,2
COMMENTS
A 365-day year and a uniform distribution of birthdays throughout the year are assumed.
LINKS
Patrice Le Conte, Coincident Birthdays.
Eric Weisstein's World of Mathematics, Birthday Problem.
FORMULA
P(n) = n!*Sum_{i=1..floor(n/2)} binomial(365, i)*binomial(365-i, n-2*i)/2^i.
EXAMPLE
a(3)=1092 because the probability that in a group of 3 people exactly two of them share the same birthday is (1/365^3)*3!*binomial(365,1)*binomial(364,1)/2 = (1/365^2)*3*364 = (1/365^2)*1092.
MATHEMATICA
P[n_] := (n! Sum[ Binomial[365, i]*Binomial[365 - i, n - 2i] /2^i, {i, 1, Floor[n/2]}]/365); Table[ P[n], {n, 2, 13}] (* Robert G. Wilson v, Feb 09 2004 *)
CROSSREFS
KEYWORD
frac,nonn
AUTHOR
Hugo Pfoertner, Feb 03 2004
EXTENSIONS
More terms from Robert G. Wilson v, Feb 09 2004
STATUS
approved