The Art of the Scratch.

Srivastava realized that the same logic could be applied to the lottery. The apparent randomness of the scratch ticket was just a facade, a mathematical lie. And this meant that the lottery system might actually be solvable, just like those mining samples. ‘At the time, I had no intention of cracking the tickets,’ he says. He was just curious about the algorithm that produced the numbers.

In Wired, Jonah Lehrer tells the story of how a Canadian statistician broke the code behind lottery scratch-off tickets. “‘It wasn’t that hard,’ Srivastava says. ‘I do the same kind of math all day long.’” (The trick, in brief: Look for numbers that only appear once on a card, in a winning combination.)