login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257299 Numbers n for which each of the digits 0-9 appears exactly once as first digit in the orbit of n under iterations of n -> (first digit of n)*(n with first digit removed) until a single digit is reached; no leading zeros allowed. 2

%I #24 Jan 02 2023 12:30:51

%S 9848,51948,56648,68648,77712,84157,87207,98142,98642,249217,298242,

%T 325803,328957,381082,383003,423027,461992,516957,549492,721712,

%U 796523,812157,879707,925492,945992,948742,950742,960492,1248242,1957313,2211992,2259492,2282707

%N Numbers n for which each of the digits 0-9 appears exactly once as first digit in the orbit of n under iterations of n -> (first digit of n)*(n with first digit removed) until a single digit is reached; no leading zeros allowed.

%C 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.

%C 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.

%H Chai Wah Wu, <a href="/A257299/b257299.txt">Table of n, a(n) for n = 1..55</a> (a(1)-a(54) from M. F. Hasler)

%H L. Blomberg, in reply to E. Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2015-April/014771.html">10-line tables ?</a>, SeqFan list, Apr 28 2015

%e 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.

%e For a(2) = 51948, the sequence is 51948 -> 9740 -> 6660 -> 3960 -> 2880 -> 1760 -> 760 -> 420 -> 80 -> 0.

%e For 79855 -> 68985 -> 53910 -> 19550 -> 9550 -> 4950 -> 3800 -> 2400 -> 800 -> 0, there appears a "leading zero", but only in front of zero.

%e a(54) = 24578492 is in the sequence because it yields the sequence 24578492 -> 9156984 -> 1412856 -> 412856 -> 51424 -> 7120 -> 840 -> 320 -> 60 -> 0.

%o (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}

%o (Python)

%o from itertools import permutations

%o A257299_list = []

%o for n in permutations('123456789',9):

%o ....x = 0

%o ....for d in n:

%o ........q, r = divmod(x,int(d))

%o ........if r:

%o ............break

%o ........x = int(d + str(q))

%o ....else:

%o ........A257299_list.append(x)

%o A257299_list = sorted(A257299_list) # _Chai Wah Wu_, May 11 2015

%o (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

%K nonn,base,fini,full

%O 1,1

%A _Eric Angelini_ and _M. F. Hasler_, May 08 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)