approximately 505.997, which is barely below 506, the value of attained when . Therefore, 23 people suffice. Incidentally, solving for n gives the approximate formula of Frank H. Mathis cited above. This derivation only shows that at most 23 people are needed to ensure a birthday match with even chance; it leaves open the possibility that is 22 or less could also work. Generalizations Arbitrary number of days Given a year with days, the generalized birthday problem asks for the minimal number such that, in a set of randomly chosen people, the probability of a birthday coincidence is at least 50%. In other words, is the minimal integer such that The classical birthday problem thus corresponds to determining . The first 99 values of are given here : {| class="wikitable" style="text-align:center;" |- ! scope="row" | | 1–2 || 3–5 || 6–9 || 10–16 || 17–23 || 24–32 || 33–42 || 43–54 || 55–68 || 69–82 || 83–99 |- ! scope="row" | | 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 |} A similar calculation shows that = 23 when is in the range 341–372. A number of bounds and formulas for have been published. For any , the number satisfies These bounds are optimal in the sense that the sequence gets arbitrarily close to while it has as its maximum, taken for . The bounds are sufficiently tight to give the exact value of in most of the cases. For example, for 365 these bounds imply that and 23 is the only integer in that range. In general, it follows from these bounds that always equals either where denotes the ceiling function. The formula holds for 73% of all integers . The formula holds for almost all , i.e., for a set of integers with asymptotic density 1. The formula holds for all , but it is conjectured that there are infinitely many counterexamples to this formula. The formula holds for all , and it is conjectured that this formula holds for all . More than two people sharing a birthday It is possible to extend the problem to ask how many people in a group are necessary for there to be a greater than 50% probability that at least 3, 4, 5, etc. of the group share the same birthday. The first few values are as