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
1124816 (hit:
the digit d = 1 appears in S = 16)
2486 (we
have erased all 1s of the last concatenation)
248620
(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:
486018273645
(hit: the digit d = 4 appears in S = 45)
8601827365
860182736546
86018273654656
8601827365465667
860182736546566780
(hit: the digit d = 8 appears in S = 80)
601273654656670
60127365465667064
(hit: the digit d = 6 appears in S = 64)
01273545704
(we have now a leading zero)
Rule: we
leave the above string as it is and iterate from there, as we’ve done so
far (the leading zero will appear at some point in some S)
0127354570438
012735457043849
01273545704384962
0127354570438496270
(hit: the digit d = 0 appears in S = 70)
1273545743849627
Etc.
You’ve
certainly noticed that the starting N of the above example (N = 1124) is
nothing else but the beginning of the sequence starting with N = 11.
As all
the sequences that start with 0 < N < 11 end almost immediately (N = 10, 101,
0), we could ask ourselves if the sequence produced by N = 11 ends at some
point? Grows forever? Loops? Vanishes?
Forgive,
as always, the typos left in this message/computations; I hope the idea is
clear.
Best,
É.
__________
Update, a couple of hours after this was sent to Math-Fun:
[Michael Branicky]:
[Me]:
> Waooooow, Michael! > I'm k.o.! > Do you still have the longest string of yr computation? > And what about another start (like N = 12) > (no, just kidding!-) > Best, > É.
[Michael]:
> Eric,
> starting at "11", the longest string encountered: 444444414144444454144444145454455155154545515454564756517555545657676664465677675961617616416561527541551562575592651853254255356658359962263264365667368971272273374676377982812823836853869892911922935952968991101010121016 (length 222)
>"12" ends at step 384831
>See https://colab.research.google.com/drive/1LtQlt32jYCRB08LOE5-RmZb-FEYZrAug for link to Python Notebook
>Cheers,
>Michael
[Hans Havermann]:
>> [Eric asks]: "Do you still have the longest string of yr computation?"
> I guess we can both check this against Michael's response. :) At step 1011800 we have the length-222 string: 444444414144444454144444145454455155154545515454564756517555545657676664465677675961617616416561527541551562575592651853254255356658359962263264365667368971272273374676377982812823836853869892911922935952968991101010121016
[Hans to Eric]:
> "At step 1011800 we have the length-222 string"
I didn't know we were starting with "11" (I started with "1124"). So it is at step 1011802. That explains my difference of 2 for the total number of steps before reaching the empty string[Hans, exploring this idea further]:
[Hans again, a couple of hours later on Math-Fun]:
http://cinquantesignes.blogspot.com/2022/07/does-this-iteration-end-sum-and-erase.html Eric's procedure appears to mostly vanish small starting integer strings but there are cycles: 25, 31, 63, 67, 69, 77, 92, 96, 99, 105, 109, 116, 133, 138, 148, 152, 161, 162, 163, 168, 174, 194, 197, 198, 206, ... run into them, or rather into it, since it's always the same length-583792 cycle, call it c3374 after its shortest string. Can anyone find any other cycle?
_______________________________
... Beautiful discovery, Hans, many thanks!
See hereunder how an integer like 282 vanishes:
step #0 = 282
step #1 = 28212 (hit: the digit d = 2 appears in S = 12)
step #2 = 81
step #3 = 819
step #4 = 81918 (hit: the digit d = 8 appears in S = 18)
step #5 = 191
step #6 = 19111 (hit: the digit d = 1 appears in S = 11)
step #7 = 9
step #8 = 99 (hit: the digit d = 9 appears in S = 9)
step #9 = .. (vanishes)
(to be continued?)
___________________________________
Yes! Hans wrote another couple of hours later:
[Hans]:
___________________________________________
In case s/o is interested, here are "minimal representatives" of some more cycles I've found, and their length or size (number of elements in the cycle): 332 (size: 14072) ; 0999 (size: 624885) ; 3374 (size: 583792) ; 3933 (size: 10537) ; 083433 (size: 120621) ; 222227222772202078 (size: 1723) ; 5464644657500000011711019071641751 (size: 49, the one found by Hans).
RépondreSupprimer