Numbering scheme [for Turing machines]

One can number Turing machines and get their rules using

Flatten[MapIndexed[{1, -1} #2 + {0, k} {1, 1, 2} Mod[Quotient[#1, {2k, 2, 1}], {s, k, 2}] + {1, 0, -1} &, Partition[IntegerDigits[n, 2 s k, s k], k], {2}]]

The examples on page 79 have numbers 3024, 982, 925, 1971, 2506 and 1953.