This is the story of a man who won the lottery 14 times – only for it all to blow up in his face.

Romanian-born economist Stefan Mandel used a simple mathematic equation to earn his fortune, but the ploy saw him move countries, employ staff and even face legal battles. His impressive tale was recounted by TikToker @skylerbuns in a video liked more than 102,000 times at the time of writing.

Skyler explained Mandel was earning the equivalent of $88 or £69 a month when he decided to take his financial fate into his own hands. "He tried a system out to win the lottery twice, netting him around $3,000 [£2,344] and getting his family out of the country," he said.

"Stefan moved to Israel and then settled in Australia where he perfected his system and won the lottery 12 more times."

So, how did he do it? Mandel's system was relatively simple – but required some perseverance to pull off. He first worked out the total number of possible combinations that could win him the jackpot.

He then found draws where purchasing every single possible ticket would cost him less than the sum up for grabs in the draw, and then he would do just that – print millions of lottery tickets, covering every possible combination of numbers that came up.

"At the time, all of this was legal," Skyler added, "Until Australia and the UK caught on to which they made it illegal to buy tickets in bulk and use computer-generated numbers."

But Mandel was undeterred. He researched the US draws with the fewest number combinations and settled on a lottery in Virginia. He had 16 members of staff printing tickets and sending them to the US in another bid to win big.

While the group were successful, the move wasn't popular with lotto officials. Mandel eventually became embroiled in a four-year legal battle, using up much of the cash he had earned through his scheme.

While he was cleared of all charges, the financial burden of the lawsuit saw him file for bankruptcy in 1995. His tactic was then banned in the US.

But that didn't stop fans from praising his 'genius' on social media. Commenting on Skyler's video, one person wrote: "Thats so genius bruh."

Another chimed in: "That’s genius," while a third agreed: "The house bans you from outsmarting it."

And it's not all bad news – the maths whizz now spends his days lounging on a beach on a remote tropical island called Vanuatu, off the coast of Australia. He no longer plays the lottery, having 'retired' from the game.

Mandel's tactic is called 'combinatorial condensation' and is now forbidden in most jackpots. Explaining the method, he previously said: "I’m a man who takes risks, but in a calculated way.

"Trimming my beard is a lottery: There is always the possibility that I’ll cut myself, get an infection in my blood and die – but I do it anyway. The chances are in my favour."