%I
%S 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,
%T 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,
%U 1,20,35,2,25,1,28,27,12,26,41,1,31,43,22,34,5,20,33,30
%N 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.
%C The first values of k for which a(k) = 1 are 91, 182, 364, 455, 728, 910, 1456, 1729, 1820, 1853, 1879.  _Giovanni Resta_, Feb 04 2019
%C From _Chai Wah Wu_, Feb 04 2019: (Start)
%C a(n) <= 64 for all n.
%C Let f(n) = A320486(2*n) and k = 9876543210. If n > k/2, then f(n) <= k. Note that a(n) = a(f(n)) + 1 if a(f(n)) >= 0 and a(n) = 1 if a(f(n)) = 1.
%C If k/2 < n <= k, then f(n) <= n*198/1000 < k/2. Thus if n > k, f(f(n)) <= k/2.
%C This means that we only need to study trajectories for 0 <= n <= k. The longest trajectories in this range have 64 steps and are reached by the 9 numbers 1233546907, 1323546907, 1335246907, 1335467407, 1335469072, 1335469207, 1335471907, 1337046907, 2133546907. The first application of f(.) takes all these numbers to the number 26709381, which then follows 63 steps to 1. Since these 9 numbers all have a double digit 3, they are not in the range of f and thus not part of a longer trajectory. Thus for all n > k, a(f(n)) <= 63, and a(n) <= 64.
%C There are 74801508 numbers in the range 0 <= n <= k such that a(n) = 1.
%C (End)
%C All trajectories will reach one of four cycles: 0, 1, 91, or 910.  _Chai Wah Wu_, Feb 11 2019
%H David Consiglio, Jr., <a href="/A323835/b323835.txt">Table of n, a(n) for n = 0..999</a>
%e 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.
%o (Python)
%o def A323835(n):
%o mset, m, c = set(), n, 0
%o while True:
%o if m == 0 or m == 1:
%o return c
%o m = int('0'+''.join(d if str(2*m).count(d) == 1 else '' for d in str(2*m)))
%o if m in mset:
%o return 1
%o mset.add(m)
%o c += 1 # _Chai Wah Wu_, Feb 04 2019
%Y Cf. A320485, A320487, A323832.
%K nonn,base
%O 0,3
%A _N. J. A. Sloane_, Feb 03 2019
%E More terms from _David Consiglio, Jr._, Feb 04 2019
