OFFSET
1,1
COMMENTS
Numbers for which a leading zero appears in "n with first digit removed" are excluded from this sequence. One could consider the variant where this is allowed in case of a "multi digit zero", i.e., if the last step is x0...0 -> x*0...0 -> 0, see the example of 79855.
The sequence is necessarily finite, because the considered iterations must end in 0 and reach one of the 9 values {10, 20, ..., 90} just before this last iteration, and there must be exactly 9 iterations. This leaves only a finite number of possible starting values n.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..55 (a(1)-a(54) from M. F. Hasler)
L. Blomberg, in reply to E. Angelini, 10-line tables ?, SeqFan list, Apr 28 2015
EXAMPLE
a(1) = 9848 is in the sequence because if we consider 9848 -> 9 * 848 = 7632 -> 7 * 632 = 4424 -> 4 * 424 = 1696 -> 1 * 696 = 696 -> 6 * 96 = 576 -> 5 * 76 = 380 -> 3 * 80 = 240 -> 2 * 40 = 80 -> 8 * 0 = 0, each of the digits 0-9 appears exactly once as first digit.
For a(2) = 51948, the sequence is 51948 -> 9740 -> 6660 -> 3960 -> 2880 -> 1760 -> 760 -> 420 -> 80 -> 0.
For 79855 -> 68985 -> 53910 -> 19550 -> 9550 -> 4950 -> 3800 -> 2400 -> 800 -> 0, there appears a "leading zero", but only in front of zero.
a(54) = 24578492 is in the sequence because it yields the sequence 24578492 -> 9156984 -> 1412856 -> 412856 -> 51424 -> 7120 -> 840 -> 320 -> 60 -> 0.
PROG
(PARI) is(n, d=0)={while(n, bittest(d, (n=divrem(n, 10^L=#Str(n\10)))[1])&&return; #Str(n[2])==L||return; d+=1<<n[1]; n=n[1]*n[2]); d==2^10-2}
(Python)
from itertools import permutations
A257299_list = []
for n in permutations('123456789', 9):
....x = 0
....for d in n:
........q, r = divmod(x, int(d))
........if r:
............break
........x = int(d + str(q))
....else:
........A257299_list.append(x)
(PARI) A257299(v=0, d=vector(9, i, i))={Set(concat(vector(#d, i, if(v%d[i], [], if(#d>1, A257299(eval(Str(d[i], v/d[i])), vecextract(d, Str("^"i))), [eval(Str(d[i], v/d[i]))])))))} \\ Use just A257299() for the complete list. - M. F. Hasler, May 11 2015
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Eric Angelini and M. F. Hasler, May 08 2015
STATUS
approved