Last week, two very lucky people won the Mega Millions lottery jackpot (here‘s a profile on one of the winners). This particular lottery is played in 41 out of the 50 states, and these two individuals will share a combined, pre-tax total of $380 million.

But are they so lucky after all? Setting aside the common notion that winning the lottery can actually do you more harm than good, some people are concerned because of the numbers themselves that made the winning ticket.

The numbers drawn for this particular lottery were 4, 8, 15, 25, 47, and 42. Note that the last number is lower than the number that precedes it because it is the so-called “Mega Number,” which is drawn from a different pool than the first five. For those of you with a penchant for televised dramas set in tropical locations, you may note that these numbers bear a striking similarity to Hurley’s numbers from Lost.

As evidenced by the above image, Hurley’s number’s were 4, 8, 15, 16, 23, and 42. In other words, 4 out of the 6 Mega Millions numbers matched Hurley’s!

Unfortunately, Lost fans will note that this is not necessarily a good thing; on the show, the numbers caused Hurley nothing but trouble (including, but not limited to, a meteor strike on his place of work). Hurley (real name Jorge Garcia) himself wrote on his blog: “When will you people learn? The numbers are bad!”

From a mathematical standpoint, though, I’m less interested in whether or not the numbers are cursed (if the show is any indication, this question has already been decisively settled), and more interested in how likely it is for the lottery jackpot to so closely match the numbers from the show.

Lottery odds are quite well understood. What’s more, someone by the name of Durango Bill has a website devoted to odds for the Mega Millions lottery (he also calculates that the odds of dying in a car accident on the way to buy a lottery ticket are almost 6 times as high as the odds of winning the lottery itself). We don’t need all the information on this site, though, just some of it.

To calculate the odds, one needs to know how many numbers are in play for the lottery. The first five numbers are drawn from a pool (without replacement) of 56, while the Mega Number is drawn from a pool of 46. Since we are choosing 5 numbers from the original 56, the total number of outcomes is 56 choose 5, or 3,819,816. Clearly there are 46 different choices for the Mega Number. Therefore, the total number of outcomes is the product 3,819,816 x 46 = 175,711,536.

(As an aside, note that this is much higher than the number of outcomes available if the Mega Number didn’t exist, and one simply chose 6 numbers from the pool of 56. In this case, the number of outcomes would be 56 choose 6, or 32,468,436. In other words, use of the Mega Number effectively makes the number of outcomes over 5 times larger, thereby significantly decreasing the likelihood of a jackpot!)

Now, what are the odds that three of the five numbers, in addition to the Mega Number, will match the Lost numbers? Well, there’s only one way to match the Mega Number, but there are 5 choose 3 = 10 ways to match 3 of the 5 Lost numbers, and 51 choose 2 = 1,275 ways to match 2 of the 51 non-lost numbers. Therefore, the total number of favorable outcomes is 1,275 x 10 = 12,750, which means the probability of this event occurring must be 12,750/175,711,536 (the proportion of total outcomes which are favorable), which amounts to around 1 in 13,781. In particular, this is 12,750 times as likely as winning the jackpot, for which the odds are 1/175,711,536.

“But wait!” you might say. “Not only did the numbers match, but their positions matched too!” In other words, the 4, 8, and 15 were the first three numbers in both lotteries. If we take position into account, we could ask “What are the odds that 3 of the 5 numbers and the Mega Number match the Lost Numbers, and have the same position?” You should expect that these odds are lower, since we are now further restricting the types of tickets that we count (for example, the ticket 1 2 4 8 15 42 would count only if position doesn’t matter).

If we fix the positions, then we want to count the number of possible lottery tickets of the form 4 8 15 *a b* 42, where *a* must be between 17 and *b* (since the numbers are listed in increasing order and 16 is not allowed), not including 23, and *b* must be between *a* and 56, not including 23.

To count these outcomes, we split into two cases. First, if *a *is between 17 and is less than 23, then there are 6 choices for *a* (17, 18, 19, 20, 21, or 22) and for each choice of *a* there are 56 – *a* – 1 = 55 – *a* choices for *b* (since *b* must lie between *a* + 1 and 56, and can’t be 23). Therefore, the total number of outcomes if *a* is less than 23 is

Secondly, if *a* is greater than 23, then there are 32 choices for *a *(since *a* must lie between 24 and 55), and for each choice of *a* there are now 56 – *a* choices for *b*. In particular, note that *a* can never be 56, since *a* must be less than *b*, and 56 is the highest possible number. Therefore, in this case, the number of outcomes is

From this, we see the number of favorable outcomes is now only 213 + 528 = 741, which makes the probability of a jackpot with 4 of 6 numbers (including the Mega Number) in the same position as 4 of the 6 Lost Numbers only 741/175,711,536, or roughly 1 in 237,128. In particular, the odds are decreased by a factor of over 17.

To put it more succinctly, the odds are small. But when the lottery is involved, one frequently encounters unlikely events such as this. While it’s a cool coincidence, I think we can all agree it’s unwise to play the Lost Numbers when you buy your lottery tickets. It just doesn’t make sense to choose the most popular possible combination of numbers – after all, you don’t want to share that Jackpot with anyone.

Just as importantly, of course, nobody wants to bet with cursed numbers.