Erase the progression

Today we are growing numbers.
Start with n.
Check if there are 3 or more adjacent digits building a “+1 progression”, or a “-1 progression”.
Like here (in red), 4451236 or there, 4453216.
If yes, erase the progression and concatenate what is left:
4451236 –> 4451236 –> 4456
4453216 –> 4453216 –> 4456
Check again and erase again if necessary:
4456 –> 4456 –> 4 (transforming 4451236 into 4 is considered as a single step).
Now that there are no more such progressions in the result, we multiply it by 2:
4*2 –> 8
And we iterate.

We start with 1 for a first try (this will help us improving the rules):
S = 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 33554, 67108, 134216, 268432, 268, 536, 1072, 2144, 4288, 8576, 17152, 34304, 68608, 137216, 274432, 274, 548, 1096, 2192, 4384, 8768, 8, ...
We see that 1, 2, 4 and 8 enter into a loop.

Shouldn’t we be more precise with our definition of a “+1/-1 progression”? Of an erasure?
For instance, do we erase a chunk of digits like 12321?
Yes.
Do we erase a chunk of digits like 123432? Yes.
Do we erase a chunk of digits like 012? Yes.
What about 901? No.
And what about 8910? Nice try… but no erasure again!
Patterns like 101 and 121 are not erased either (we want at least 3 distinct digits in the erasure).
And we don't erase full patterns like 12343 or 8789 because we always need 3-ascending or 3-descending digits to trigger an erasure (thank you Hans H.)
What about leading zeros? 
Indeed, what happens if we erase 123 here: 12300444?
Well, we suggest to erase also such leading zeros: 12300444 will become 444 (thank you Giorgos)
Ok, I guess we are fully equipped with the rules.

Let us start now S with a(1) = 3:
S = 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 396, 792, 1584, 3168, 6336, 12672, 25344, 50688, 101376, 202752, 405504, 811008, 1622016, 3244032, 6488064, 12976128, 25952256, 51904512, 103809024, 207618048, 415236096, 830472192, 1660944384, 3321888768, 3888, 7776, 15552, 31104, 62208, 124416, 248832, 497664, 995328, 1990656, 3981312, 7962624, 15925248, 31850496, 63700992, 127401984, 254803968, 509607936, 1019215872, 2038431744, 4076863488, 8153726976, 16307453952, 32614907904, 65229815808, 130459631616, 260919263232, 521838526464, 1043677052928, 2087354105856, 4174708211712, 8349416423424, 8349416424, 16698832848, 33397665696, 66795331392, 133590662784, 267181325568, 534362651136, 1068725302272, 2137450604544, 4274901209088, 4274909088, 8549818176, 17099636352, 34199272704, 68398545408, 136797090816, 273594181632, 547188363264, 1094376726528, 2188753453056, 2188753056, 4377506112, 8755012224, 8755224, 17510448, 35020896, 70041792, 140083584, 280167168, 560334336, 1120668672, 2241337344, 4482674688, 8965349376, 17930698752, 17930652, 35861304, 71722608, 143445216, 286890432, 286890, 573780, 1147560, 2295120, 4590240, 9180480, 18360960, 36721920, 73443840, 146887680, 146880, 293760, 587520, 1175040, 2350080, 4700160, 9400320, 18800640, 37601280, 37680, 75360, 150720, 301440, 602880, 1205760, 2411520, 4823040, 9646080, 19292160, 38584320, 38580, 77160, 154320, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 655360, 1310720, 2621440, 5242880, 10485760, 20971520, 41943040, 83886080, 167772160, 335544320, 335540, 671080, 1342160, 2684320, 2680, 5360, 10720, 21440, 42880, 85760, 171520, 343040, 686080, 1372160, 2744320, 2740, 5480, 10960, 21920, 43840, 87680 –> loop [see the underlined 80, above – thanks Giorgos!]

Question
Is there an a(1) = k such that S grows indefinitely?
What about other loops? Maximum altitudes, flight lengths?
______________________
Same day update, by Giorgos K.
> Here are the loop records for different starting values
a(1)        -> length of loop
 1    ->   47
 3    ->  195
 7    ->  287
 17   ->  456
 27   ->  521
 57   ->  575
 133  ->  683
 441  ->  689
 523  ->  717
 813  ->  721
 1121 ->  812
 1401 ->  853
 2301 ->  867
 2517 ->  896
 2967 ->  932
 4443 ->  972
 7973 ->  986

Waow, impressive, many thanks GK!
______________________
December 18th update
Hans Havermann found an infinite such seq, starting with a(1) = 7 and entering a nice "sort-of-loop":

HH:
> I'm attaching a graph of 6000 terms of a(1) = 7. There is a sort-of loop of length 472 but it comes with a caveat. The terms of each such pseudo-loop are ten times larger than those of its predecessor loop. 
(a(1),a(2)) = (7,14). (a(473),a(474)) = (143454560,140). (a(945),a(946)) = (1434545600,1400).
The terminal-zero expansions happen at a(145), a(617), a(1089), ...


____________________
December 19th 2023 update

HH:
> Any primary loop is the basis of an infinite number of others simply by adding a given number of terminal zeros to the loop terms. For example, the primary 8-loop may be morphed into 80, 800, 8000, etc. In addition to a default 0-loop, (0, 0) for anything that evolves into either an all-zeros term or a total-erasure situation, I have seven primary loops:

>(8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 33554, 67108, 134216, 268432, 268, 536, 1072, 2144, 4288, 8576, 17152, 34304, 68608, 137216, 274432, 274, 548, 1096, 2192, 4384, 8768, 8)

>(18, 36, 72, 144, 288, 576, 1152, 2304, 4608, 9216, 18432, 18)

>(1068, 2136, 4272, 8544, 17088, 34176, 68352, 136704, 273408, 546816, 1093632, 2187264, 4374528, 8749056, 17498112, 34996224, 69992448, 139984896, 279969792, 559939584, 1119879168, 1119168, 2238336, 4476672, 8953344, 17906688, 35813376, 71626752, 143253504, 153504, 307008, 614016, 1228032, 2456064, 2064, 4128, 8256, 16512, 33024, 66048, 132096, 264192, 528384, 1056768, 1068)

>(13016, 26032, 52064, 104128, 208256, 416512, 833024, 1666048, 3332096, 6664192, 13328384, 26656768, 26668, 53336, 106672, 213344, 426688, 853376, 1706752, 3413504, 6827008, 13654016, 13016)

>(26484, 52968, 105936, 211872, 423744, 847488, 1694976, 3389952, 6779904, 13559808, 27119616, 54239232, 108478464, 216956928, 433913856, 867827712, 827712, 1655424, 3310848, 6621696, 13243392, 26486784, 26484)

>(36832, 73664, 147328, 294656, 589312, 1178624, 2357248, 4714496, 9428992, 18857984, 37715968, 75431936, 71936, 143872, 287744, 575488, 1150976, 2301952, 4603904, 9207808, 18415616, 36831232, 36832)

>(721664, 1443328, 2886656, 5773312, 11546624, 23093248, 46186496, 92372992, 184745984, 369491968, 738983936, 1477967872, 1477972, 2955944, 5911888, 11823776, 23647552, 47295104, 94590208, 189180416, 378360832, 756721664, 721664)

> Are there others?
____________________
Thank you Giorgos and Hans, nice work(s)!
Time now... to erase a portion of Swiss cheese.






Commentaires

Posts les plus consultés de ce blog

Beautés ?

Underline, reproduce

Le tripalin se présente