It all begins with the digit 1. Let's build a sequence by doubling the last number obtained at each step: this gives 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1,024, 2,048, 4,096, 8,192, 16,384, 32,768, 65,536…, namely the sequence of powers of 2. A classic!
Now let us introduce a "stopping rule" into the process: the sequence stops as soon as a term contains at least one repeated digit. Here this happens at 65,536, which contains two "5s" (and two "6s" as well). The sequence comes to an abrupt halt. Now for a "restart rule": the sequence resumes with the number obtained by deleting from the final term (here 65,536) every digit that occurs more than once. The next term is therefore 3, and the sequence becomes 65,536, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1,536, 3,072, 6,144 (stop), 61 (restart), 122 (stop), 1 (restart), which takes us back to the beginning of the procedure.
Breaking out of loops ----------------------
This kind of loop is entertaining and already raises a few arithmetic questions (how can we characterize the sequences that enter a loop? What is the average length of a sequence that does so?). But the simplest way to escape such loops is to introduce a different restart rule: after a stop, let the sequence restart with the smallest number not yet in the sequence. Thus 65,536 is followed by 3 (since 1 and 2 already appear in the sequence), and then, as before, 6,144; but instead of continuing with 61, the sequence continues with 5, which at this stage is the smallest number absent from the sequence. We obtain 6,144, 5, 10, 20, 40, 80, 160, 320, 640, 1,280, 2,560, 5,120, 10,240 (a stop caused by the two "0s"), 7 (the smallest integer not appearing in the sequence), 14, 28, 56, 112 (stop), 9 (restart), 18… We are guaranteed never to enter a loop, provided we allow the term that restarts the sequence to contain repeated digits itself. Every natural number will thus be visited at least once.
Named in tribute to the American Stephen Wolfram, the Marflow rules ("Marflow" is a palindrome of "Wolfram") apply to any sequence generated by repeated multiplication: we stop the sequence whenever a specified digit appears in the result of the most recent multiplication. Thus the sequence M173 (see ****) starts at 1, proceeds by multiplying its last term by 7 at each step, and stops as soon as a 3 appears—hence its name. Here too, the restart rule continues the sequence with the smallest number absent from M173, even if that number contains a 3: M173 = 1, 7, 49, 343 (stop), 2 (the smallest integer not yet written), 14, 98, 686, 4,802, 33,614 (stop), 3 (restart and stop), 4 (restart), 28, 196, 1,372, 5, 35, 6, 42, 294, 2,058, 14,406, 100,842, 705,894, 4,941,258, 34,588,806, 8, 56, 392, 9, 63, 10, 70, 490, 3,430, 11, 77, 539, 12, 84, 588, 4,116, 28,812, 201,684, 1,411,788, 9,882,516, 69,177,612, 484,243,284, 13, 15…