OFFSET
0,3
COMMENTS
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
From Chai Wah Wu, Feb 04 2019: (Start)
a(n) <= 64 for all n.
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.
If k/2 < n <= k, then f(n) <= n*198/1000 < k/2. Thus if n > k, f(f(n)) <= k/2.
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.
There are 74801508 numbers in the range 0 <= n <= k such that a(n) = -1.
(End)
All trajectories will reach one of four cycles: 0, 1, 91, or 910. - Chai Wah Wu, Feb 11 2019
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 0..999
EXAMPLE
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.
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Feb 03 2019
EXTENSIONS
More terms from David Consiglio, Jr., Feb 04 2019
STATUS
approved