OFFSET
0,3
COMMENTS
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.
LINKS
Eric Weisstein's World of Mathematics, Birthday Problem.
FORMULA
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.
EXAMPLE
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.
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".
PROG
(PARI) a(n) = if(n>30, 10^12, round(10^12*(1.-30!/((30-n)!*30^n)))) for(k=0, 31, print1(a(k), ", "))
CROSSREFS
KEYWORD
frac,nonn
AUTHOR
Rick L. Shepherd, Oct 24 2004
STATUS
approved