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.
%I A099600 #16 Feb 16 2025 08:32:55 %S A099600 0,0,33333333333,97777777778,188000000000,296266666667,413555555556, %T A099600 530844444444,640314074074,736230320988,815361224691,876907483128, %U A099600 922041405981,953224843588,973494078033,985863508285,992931754142,996701485266,998570643615,999428257446,999790361064,999930120355,999979036106,999994409628,999998695580,999999739116,999999956519,999999994203,999999999420,999999999961,999999999999,1000000000000 %N A099600 Inventory application: Numerator of the probability (rounded to the nearest trillionth: (10^-12)-th) of at least one shortage per month when n customers each request one item on one independently-chosen random day of a 30-day month, but when only exactly one such item is available per day. %C A099600 A shortage occurs each time a customer cannot immediately be provided the item (that is, on the day it is requested). The denominator is always 10^12 here. Inspired by just-in-time inventory considerations for pharmacies, where new prescriptions and refills are usually for 30-day supplies, many medications are expensive and it is important to minimize cost of inventory and inconvenience of shortages to patients, pharmacists and supply clerks. Of course similar sequences can be computed for probabilities of at least (or exactly) m shortages per month under the same conditions and/or with higher item availabilities. %H A099600 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BirthdayProblem.html">Birthday Problem.</a> %F A099600 a(n) = round(10^12 * (1. - 30!/ ((30-n)! * 30^n) )) for 0 <= n <= 30. This corresponds, with d=30, to P_2(n, d) at the MathWorld Birthday Problem link. Clearly the probability is 1 and so a(n) = 10^12 here for all n > 30. %e A099600 a(2) = 33333333333, so if only two customers each request the item on random days during the month, there is only a .033(3333...) or ~3.3% probability that they would do so on the same day - causing a shortage for the second customer. However, "collisions" of needs/wants go up rapidly with the number of customers. %e A099600 a(7) = 530844444444, so 7 = A033810(30) is the least number of customers for which the probability of at least one shortage during the month, 0.530844444444, exceeds 0.5 or 50%. This corresponds to the solution of the Birthday Problem, where A014088(2) = 23 = A033810(365), on a planet (or moon) with a 30-day "year". %o A099600 (PARI) %o A099600 a(n) = if(n>30, 10^12, round(10^12*(1.-30!/((30-n)!*30^n)))) %o A099600 for(k=0,31,print1(a(k),",")) %Y A099600 Cf. A014088, A033810. %K A099600 frac,nonn %O A099600 0,3 %A A099600 _Rick L. Shepherd_, Oct 24 2004