%I #28 Sep 26 2021 18:58:21
%S 25,26,28,34,35,36,38,43,46,52,53,62,63,64,82,83,236,239,246,254,296,
%T 326,329,362,392,426,462,524,542,926,962
%N Positive integers with no digit equal to 0 or 1 such that when one iterates x -> A340270(x) starting with n, one eventually enters a cycle containing an integer greater than 9.
%C This was suggested by postings by Eric Angelini and Allan Wechsler to Math-Fun Mailing List, Dec. 29, 2020. It is an open question whether or not this sequence is complete. In fact, it is open whether or not the sequence of iterates of x -> A340270(x) starting with n always enters a cycle. There are no counterexamples up to 10^8.
%C As Allan Wechsler pointed out, if x contains 0 then A340270(x) = 1 and if x contains a digit 1 then A340270(x) is x with the 1 deleted.
%C From _M. F. Hasler_, Jan 03 2021: (Start)
%C The trajectory of all these integers ends in one of 3 cycles:
%C C(25) = (25) (also for n = 52, for n = 35 and 53 via 125, and for n = 38 and 83 via 512, and for n = 239, 329 and 392 via 1521 and 152);
%C C(26) = (26, 36, 216) (also for n = 62 and 63, for n = 246 and 426 and 462 via 2116 and 216);
%C C(926) = (926, 9216): also for 296 and 962, for 28, 34, 43 and 82 via 64 and 1296, also for 46, 236, 326 and 362 via 1296, and for 254, 524 and 54 via 2916. (End)
%e Iterating the function x->A340270(x) starting with 34 we get 34 --> 4^3 = 64 --> 6^4 = 1296 --> 296^1 = 296 --> 96^2 = 9216 --> 926^1 = 926 --> 96^2 = 9216. So 34 is in this sequence.
%p leastdigit:=proc(n) min(convert(n,base,10)); end:
%p locationdigit:=proc(n,d) local L,i;
%p L:=convert(n,base,10);
%p for i from 1 to nops(L) do
%p if d = L[i] then return (nops(L)+1-i); fi;
%p od:
%p end:
%p cutout:=proc(X,i) [seq(X[j],j=1..i-1),seq(X[j],j=i+1..nops(X))]; end:
%p ToNum:=proc(X) add(X[i]*10^(nops(X)-i),i=1..nops(X)); end:
%p removeleastdigit:=proc(n) local i,X;
%p i:=locationdigit(n,leastdigit(n));
%p X:=ListTools:-Reverse(convert(n,base,10));
%p ToNum(cutout(X,i));
%p end proc:
%p h:=proc(n) removeleastdigit(n)^leastdigit(n); end:
%p F:=proc(N) local i,L;
%p if h(N) = N then return [N]; fi;
%p L:=[N];
%p for i from 1 do
%p L:=[op(L),h(L[-1])];
%p if nops(L) > nops(convert(L,set)) then return L; fi;
%p od:
%p fail;
%p end proc:
%p G:=proc(X) if X[-1] < 10 then return "S"; else return "L"; fi; end proc:
%p L:=NULL:
%p for n from 1 to 1000 do
%p sss:=convert(n,base,10):
%p if has(0,sss) or has(1,sss) then next; fi;
%p u:=F(n);
%p if u = fail then print(n,u); break; fi;
%p if G(u) = "L" then L:=L,n; fi;
%p od:
%p L;
%o (Python)
%o def ok(n):
%o strn = str(n)
%o if "0" in strn or "1" in strn: return False
%o iterates = {n}
%o n = A340270(n)
%o while n not in iterates:
%o iterates.add(n)
%o n = A340270(n)
%o repeated = n
%o if n > 9: return True
%o n = A340270(n)
%o while n != repeated:
%o n = A340270(n)
%o if n > 9: return True
%o return False
%o print([n for n in range(1, 1001) if ok(n)]) # _Michael S. Branicky_, Jan 02 2021
%o (PARI) [n | n<-[1..9999], vecmin(digits(n))>1 && orbit(n)[1]>9] \\ with:
%o orbit(n, U=[n], m)={ while(n>9, my( m=vecmin(n=digits(n)));
%o forstep( i=#n,1,-1, if( n[i]==m, n=fromdigits(n[^i])^m; break)); setsearch(U,n) && break; U=setunion(U,[n])); U} \\ _M. F. Hasler_, Jan 03 2021
%Y Cf. A340270; A054054 (smallest digit of n).
%Y Subset of A274126 (numbers with all digits larger than 1).
%K base,nonn,more
%O 1,1
%A _W. Edwin Clark_, Jan 02 2021