we tried friends, neighbors, and -- >> i'm hoping to speak to someone named joan ginther. >> reporter: even her college, that would be stanford university where she just so happens to have a ph.d. in none other than mathematics. coincidence? probably not. when it comes to outsmarting the lottery, it helps to be a math genius. >> we're counting cards, woo's of the mit students who learned movie "21." you may not have heard of james harvey, an mit senior who noticed a quirk in a massachusetts lottery game named cash winfall. the goal in this game, match six random numbers and win the jackpot. and if the jackpot got to $2 million and nobody won, it would roll down or split between anyone who matched just three, four or five numbers. harvey realized he was virtually guaranteed a profit if he bought enough tickets and typed it perfectly to the roll-down so harvey along with a group of mit students bought a massive amount. >> they bought 700,000 tickets. it cost them $1.4 million. they worked with four different convenience stores. the stores would stay open all night. this went on for seve