I am creating some JavaScript probability calculators related to magic the gathering deck building. While doing so I wondered what the best way to randomize a players deck is. I was able to find good information on 52 card decks stating that at-lest 7 riffle shuffle are needed according to TRAILING THE DOVETAIL SHUFFLE TO ITS LAIR pdf and HOW MANY TIMES SHOULD YOU SHUFFLE A DECK OF CARDS? pdf. But these papers are a bit over my head.

I was able to find this webpage that shows a table similar to witch I wish to include in my calculator.

Cards\Shuffles 1 2 3 4 5 6 7 8 25 1.000 1.000 0.999 0.775 0.437 0.231 0.114 0.056 32 1.000 1.000 1.000 0.929 0.597 0.322 0.164 0.084 52 1.000 1.000 1.000 1.000 0.924 0.614 0.334 0.167

I would like help understanding how to calculate these numbers, which I believe came from using this formula, which I can not make sense of.

Could anyone please show me a step by step breakdown of how to calculate the total variation distance with say 32 cards and 6 shuffles?