This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A323832 #38 Feb 13 2019 17:24:17 %S A323832 0,0,19,12,18,0,11,23,17,4,19,1,10,29,22,32,16,5,3,47,18,15,1,20,9,2, %T A323832 28,26,21,13,31,24,15,1,4,23,2,18,46,21,17,51,14,15,1,24,19,2,8,10,1, %U A323832 33,27,24,25,1,20,19,12,18,30,1,23,7,14,29,5,20,3 %N A323832 Start with n and repeatedly double it and apply the "repeatedly delete any run of identical digits" operation described in A323830; a(n) is the number of steps needed to reach one of 0, 1, or 5, or -1 if none of these three numbers is ever reached. %C A323832 Conjecture: every number will eventually reach one of 0, 1, or 5. %C A323832 From _Chai Wah Wu_, Feb 04 2019, Feb 13 2019: (Start) %C A323832 Conjecture is true for n < 10^10. %C A323832 1604466 takes 115 steps to reach 5 and is the largest value for a(n) for n < 10^7. %C A323832 91070713 takes 121 steps to reach 5 and is the largest value for a(n) for n < 10^8. %C A323832 126591463 and 801282051 both take 128 steps to reach 5 and this is the largest value for a(n) for n < 10^9. %C A323832 The numbers 1582393271, 1582393293, 4645106705 all take 131 steps to reach 5 and this is the largest value for a(n) for n < 10^10. %C A323832 (End) %H A323832 Chai Wah Wu, <a href="/A323832/b323832.txt">Table of n, a(n) for n = 0..10000</a> %e A323832 Starting with 2, the trajectory is 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 636, 1272, 25, 50, 1, reaching 1 in 20 steps, so a(2) = 20. %e A323832 3 reaches 1 in 12 steps: 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 61, 1, so a(3) = 12. %e A323832 10 reaches 5 in 19 steps: 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 6360, 12720, 250, 5, so a(10) = 19. %o A323832 (Python) %o A323832 from re import split %o A323832 def A321801(n): %o A323832 return int('0'+''.join(d for d in split('(0+)|(1+)|(2+)|(3+)|(4+)|(5+)|(6+)|(7+)|(8+)|(9+)',str(n)) if d != '' and d != None and len(d) == 1)) %o A323832 def f(n): %o A323832 x = 2*n %o A323832 y = A321801(x) %o A323832 while x != y: %o A323832 x, y = y, A321801(y) %o A323832 return x %o A323832 def A323832(n): %o A323832 mset, m, c = set(), n, 0 %o A323832 while True: %o A323832 if m == 1 or m == 0 or m == 5: %o A323832 return c %o A323832 m = f(m) %o A323832 if m in mset: %o A323832 return -1 %o A323832 mset.add(m) %o A323832 c += 1 # _Chai Wah Wu_, Feb 04 2019, Feb 11 2019 %Y A323832 Cf. A321801, A321802, A323830, A323830. %K A323832 nonn,base %O A323832 0,3 %A A323832 _N. J. A. Sloane_, Feb 03 2019