Each of these sequences of 4 (beginning with the tail) is then converted to a number using NHEX with base 16:
(3493)16 = (13459)10
Then the number 13459 is divided modulo by 49 (or 26 for the last iteration), and the remainder is taken as one of the balls:
13459 mod 49 = 274 x 49 + 33 Consequently, the first ball -33
We repeat this procedure 5 times and discard the number that is already in the set. For the last ball, we simply use mod 26 instead of mod 49.
If you are a coder you can check the algorithm, published Open source.