Does this iteration end? (Sum and erase)
Does this iteration end? The procedure is easy to understand; we take any integer N (for example N = 1124), make the sum S of its digits (S = 8 here) and concatenate S at the end of N (we get 11248). We iterate from there until the leftmost digit d of N appears in S: we then erase all d ’s of the last concatenation – and start from there a new iteration. Example: 1124 11248 11 248 1 6 (hit: the digit d = 1 appears in S = 16) 2486 (we have erased all 1s of the last concatenation) 2 486 2 0 (hit again: the digit d = 2 appears in S = 20) 4860 (we have erased all 2s of the last concatenation) 486018 48601827 4860182736 … Wait, what happens if we bump into a leading zero? Let’s go on with our example to see the rule: 4 860182736 4 5 (hit: the digit d = 4 appears in S = 45) 8601827365 860182736546 86018273654656 8601827365465667 8 601 8 27365465667 8 0 (hit: the digit d = 8 appears in S = 80) 601273654656670 6 01273 6 54 6 5 66 70 6 4 ...