Where the numbers come from
You never need this to perform, but it makes the five steps stop feeling arbitrary.
Lay the deck out in order, 1 to 54, and take out the four cards on the table. Fifty are left. Push them together and renumber them 1 to 50. Every fifth one of those survivors is a candidate, and there are exactly ten because fifty divides by five. The assistant is telling the magician which of the ten, and that number is m.
The assistant’s subtraction is just a shortcut for finding the hidden card’s place among the survivors. Exactly i of the four shown cards sit below it, since it is the card i up from the bottom of the five, so its place is its value minus i. The magician’s checkpoints do the same conversion backwards, since subtracting 0, 1, 2 and 3 from the shown cards marks the points where a survivor number and a card number pull another step apart.
The encoding itself is a counting fact. Four cards shown in order out of five carry 5 × 4! = 120 signals: 24 from the arrangement and a factor of five from choosing which card to withhold. Naming one card out of fifty costs 100, so the coin fits in the slack and a three-way choice never could.
The five-card version is William Fitch Cheney’s, from the 1950s. Michael Kleber’s The Best Card Trick (Mathematical Intelligencer 24 #1, 2002, 9–11) gives the 124-card bound and the sum-mod-5 scheme used here, which Kleber credits to Elwyn Berlekamp. The 64-card-plus-coin variant, of which this is the 54-card cousin, is Berlekamp’s too, noted at the end of that paper.