cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A091673 Numerator Q of probability P = Q(n)/365^(n-1) that exactly two out of n people share the same birthday.

This page as a plain text file.
%I A091673 #40 Feb 16 2025 08:32:52
%S A091673 1,1092,793884,480299820,261163522620,132358677731280,
%T A091673 63798093049771080,29612552769907347240,13345042642324219106280,
%U A091673 5872442544965392834838400,2533775368098060137659608000,1075256447734638237381213700800
%N A091673 Numerator Q of probability P = Q(n)/365^(n-1) that exactly two out of n people share the same birthday.
%C A091673 A 365-day year and a uniform distribution of birthdays throughout the year are assumed.
%H A091673 Patrice Le Conte, <a href="/A225852/a225852.pdf">Coincident Birthdays</a>.
%H A091673 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BirthdayProblem.html">Birthday Problem</a>.
%F A091673 P(n) = n!*Sum_{i=1..floor(n/2)} binomial(365, i)*binomial(365-i, n-2*i)/2^i.
%e A091673 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.
%t A091673 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 *)
%o A091673 (Python)
%o A091673 from math import factorial, comb
%o A091673 from fractions import Fraction
%o A091673 def A091673(n): return int(factorial(n)*sum(Fraction(comb(365,i)*comb(365-i,n-(i<<1)),365<<i) for i in range(1,(n>>1)+1))) # _Chai Wah Wu_, Jan 22 2025
%Y A091673 Cf. A014088, A091674 gives probabilities for two or more coincidences, A091715 gives probabilities for three or more coincidences.
%K A091673 frac,nonn
%O A091673 2,2
%A A091673 _Hugo Pfoertner_, Feb 03 2004
%E A091673 More terms from _Robert G. Wilson v_, Feb 09 2004