Mind. Blown.
This is basically what also happens during long division! I marked the remainder of the previous operation in each line with a bracket (no italics in code formatting, sadly), appending another digit of the dividend behind them is the same operation as multiplying the 'remembered' number by 10 and adding the next digit to it:
8 5 3 6 2 9 / 7 = 1 2 1 9 4 7; remainder 0
- 7
--
[1]5 How long division works:
- 1 4 <------- subtract largest possible multiple,
---- note remainder in next line, append
[1]3 next digit from number at top, and
- 7 repeat until done. And make sure to
---- keep track of the result.
[6]6
- 6 3
----
[3]2
- 2 8
----
[4]9
- 4 9
----
[0] <= final remainder = 0, i.e. 7 is a divisor of the number
Thanks a lot for your comment, this was insightful!