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.

A072829 Greatest m such that Product_{k=1..n-1} (1 - k/m) <= 1/2.

This page as a plain text file.
%I A072829 #17 Jan 21 2025 22:26:36
%S A072829 2,5,9,16,23,32,42,54,68,82,99,116,135,156,178,201,226,252,280,309,
%T A072829 340,372,406,441,477,515,554,595,637,681,726,772,820,869,920,973,1026,
%U A072829 1081,1138,1196,1256,1316,1379,1443,1508,1575,1643,1712,1783,1856,1930,2005
%N A072829 Greatest m such that Product_{k=1..n-1} (1 - k/m) <= 1/2.
%C A072829 Among n randomly selected dates over an interval of m days (or less), the odds are even (or better than even) for two or more of them to coincide.
%F A072829 Corresponds to the ultimate occurrence of n in A033810. For large n, m has magnitude n^2 / 2 * log(2).
%e A072829 Thus a(7)=32 for instance implies that among 7 persons bearing the same astrological sign(extending over 30 days or so) the odds are trifle better than even for at least two of them further sharing a common birthday.
%t A072829 f[n_] := (k = 1; While[ Product[1 - i/k, {i, 1, (n - 1)}] <= 1/2, k++ ]; Return[k - 1]); Table[ f[n], {n, 2, 53}]
%o A072829 (Python)
%o A072829 from math import factorial, comb
%o A072829 def A072829(n):
%o A072829     f = factorial(n)
%o A072829     def p(m): return comb(m,n)*f<<1
%o A072829     kmin, kmax = n-1, n
%o A072829     while p(kmax) <= kmax**n: kmax<<=1
%o A072829     while kmax-kmin > 1:
%o A072829         kmid = kmax+kmin>>1
%o A072829         if p(kmid) > kmid**n:
%o A072829             kmax = kmid
%o A072829         else:
%o A072829             kmin = kmid
%o A072829     return kmin # _Chai Wah Wu_, Jan 21 2025
%Y A072829 Cf. A033810, A064619.
%K A072829 nonn
%O A072829 2,1
%A A072829 _Lekraj Beedassy_, Jul 22 2002
%E A072829 Edited and extended by _Robert G. Wilson v_, Jul 23 2002
%E A072829 More terms from _David Terr_, Jan 03 2005