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.

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.

This page as a plain text file.
%I A323835 #44 Feb 13 2019 08:18:17
%S A323835 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 A323835 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 A323835 1,20,35,2,25,1,28,27,12,26,41,1,31,43,22,34,5,20,33,30
%N 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.
%C A323835 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 A323835 From _Chai Wah Wu_, Feb 04 2019: (Start)
%C A323835 a(n) <= 64 for all n.
%C A323835 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 A323835 If k/2 < n <= k, then f(n) <= n*198/1000 < k/2. Thus if n > k, f(f(n)) <= k/2.
%C A323835 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 A323835 There are 74801508 numbers in the range 0 <= n <= k such that a(n) = -1.
%C A323835 (End)
%C A323835 All trajectories will reach one of four cycles: 0, 1, 91, or 910. - _Chai Wah Wu_, Feb 11 2019
%H A323835 David Consiglio, Jr., <a href="/A323835/b323835.txt">Table of n, a(n) for n = 0..999</a>
%e A323835 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 A323835 (Python)
%o A323835 def A323835(n):
%o A323835     mset, m, c = set(), n, 0
%o A323835     while True:
%o A323835         if m == 0 or m == 1:
%o A323835             return c
%o A323835         m = int('0'+''.join(d if str(2*m).count(d) == 1 else '' for d in str(2*m)))
%o A323835         if m in mset:
%o A323835             return -1
%o A323835         mset.add(m)
%o A323835         c += 1  # _Chai Wah Wu_, Feb 04 2019
%Y A323835 Cf. A320485, A320487, A323832.
%K A323835 nonn,base
%O A323835 0,3
%A A323835 _N. J. A. Sloane_, Feb 03 2019
%E A323835 More terms from _David Consiglio, Jr._, Feb 04 2019