cp's OEIS Frontend

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.

A306384 Start with n and repeatedly double it and apply the "delete any run of identical digits" operation described in A321801; 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.

This page as a plain text file.
%I A306384 #11 Feb 13 2019 17:58:37
%S A306384 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 A306384 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 A306384 33,27,24,25,1,20,19,12,18,30,1,23,7,14,29,6,20,3
%N A306384 Start with n and repeatedly double it and apply the "delete any run of identical digits" operation described in A321801; 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 A306384 Similar to A323832, but is different in that at each step, the "delete any run of identical digits" operation (A321801) is apply only once here, whereas in A323832, at each step after doubling the number, the operation A321801 is applied repeatedly until the number does not change any longer. The first term which differs from A323832 is a(66).
%C A306384 Conjecture: every number will eventually reach one of 0, 1, or 5.
%C A306384 Conjecture is true for n < 10^10.
%C A306384 2404877 takes 123 steps to reach 5 and is the largest value for a(n) for n < 10^7.
%C A306384 79620527 takes 131 steps to reach 5 and is the largest value for a(n) for n < 10^8.
%C A306384 769237841 takes 138 steps to reach 5 and is the largest value for a(n) for n < 10^9.
%C A306384 The numbers 4807736476 and 4807736509 both take 142 steps to reach 5 and this is the largest value for a(n) for n < 10^10.
%H A306384 Chai Wah Wu, <a href="/A306384/b306384.txt">Table of n, a(n) for n = 0..10000</a>
%e A306384 a(66) = 6: 66->132->264->528->1056->22->0. Contrast this with A323832(66) = 5: 66->132->264->528->1056->0.
%o A306384 (Python)
%o A306384 from re import split
%o A306384 def A306384(n):
%o A306384     mset, m, c = set(), n, 0
%o A306384     while True:
%o A306384         if m == 1 or m == 0 or m == 5:
%o A306384             return c
%o A306384         m = int('0'+''.join(d for d in split('(0+)|(1+)|(2+)|(3+)|(4+)|(5+)|(6+)|(7+)|(8+)|(9+)', str(2*m)) if d != '' and d != None and len(d) == 1))
%o A306384         if m in mset:
%o A306384             return -1
%o A306384         mset.add(m)
%o A306384         c += 1
%Y A306384 Cf. A321801, A321802, A323832.
%K A306384 nonn,base
%O A306384 0,3
%A A306384 _Chai Wah Wu_, Feb 12 2019