A323835 Start with n and repeatedly double it and apply the "delete multiple digits" map m -> A320485(m); a(n) is the number of steps needed to reach either 0 or 1, or -1 if neither 0 nor 1 is ever reached.
0, 0, 27, 12, 26, 41, 11, 31, 25, 4, 40, 1, 10, 37, 30, 43, 24, 35, 3, 42, 39, 15, 1, 20, 9, 2, 36, 26, 29, 13, 42, 32, 23, 1, 34, 44, 2, 18, 41, 21, 38, 45, 14, 15, 1, 45, 19, 2, 8, 30, 1, 20, 35, 2, 25, 1, 28, 27, 12, 26, 41, 1, 31, 43, 22, 34, 5, 20, 33, 30
Offset: 0
Examples
As we can see from A320487, 2 reaches 1 in 27 steps: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 61, 1, so a(2)=27.
Links
- David Consiglio, Jr., Table of n, a(n) for n = 0..999
Programs
-
Python
def A323835(n): mset, m, c = set(), n, 0 while True: if m == 0 or m == 1: return c m = int('0'+''.join(d if str(2*m).count(d) == 1 else '' for d in str(2*m))) if m in mset: return -1 mset.add(m) c += 1 # Chai Wah Wu, Feb 04 2019
Extensions
More terms from David Consiglio, Jr., Feb 04 2019
Comments