The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A227362 Distinct digits of n arranged in decreasing order. 12

%I #26 Nov 24 2022 05:22:16

%S 0,1,2,3,4,5,6,7,8,9,10,1,21,31,41,51,61,71,81,91,20,21,2,32,42,52,62,

%T 72,82,92,30,31,32,3,43,53,63,73,83,93,40,41,42,43,4,54,64,74,84,94,

%U 50,51,52,53,54,5,65,75,85,95,60,61,62,63,64,65,6,76,86

%N Distinct digits of n arranged in decreasing order.

%C a(n) <= 9876543210; a(a(n)) = a(n);

%C A055642(a(n)) <= 10;

%C A055642(a(n)) <= A055642(n), A055642(a(n)) = A055642(n) iff A178788(n) = 1;

%C a(A109303(n)) < A109303(n); a(A009995(n)) = A009995(n); a(A071589(n)) > A071589(n);

%C a(n) = A151949(n) + A180410(n).

%H Reinhard Zumkeller, <a href="/A227362/b227362.txt">Table of n, a(n) for n = 0..10000</a>

%p a:= n-> parse(cat(sort([{convert(n, base, 10)[]}[]], `>`)[])):

%p seq(a(n), n=0..68); # _Alois P. Heinz_, Sep 21 2022

%t f[n_] := FromDigits[Reverse@ Union@ IntegerDigits@ n]; f /@ Range[0, 68] (* _Michael De Vlieger_, Apr 16 2015, corrected by _Robert G. Wilson v_ *)

%o (Haskell)

%o import Data.List (nub, sort)

%o a227362 = read . reverse . sort . nub . show :: Integer -> Integer

%o (PARI) a(n) = {if (n == 0, d = [0], d = digits(n)); eval(subst(Pol(vecsort(d,,12)), x, 10));} \\ _Michel Marcus_, Apr 16 2015

%o (PARI) a(n)=fromdigits(vecsort(digits(n),,12)) \\ _Charles R Greathouse IV_, Apr 16 2015

%o (Python)

%o def A227362(n): return int(''.join(sorted(set(str(n)),reverse=True))) # _Chai Wah Wu_, Nov 23 2022

%Y Cf. A004186, A230959.

%K nonn,base,look

%O 0,3

%A _Reinhard Zumkeller_, Jul 09 2013

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 May 15 11:04 EDT 2024. Contains 372540 sequences. (Running on oeis4.)