login
A227362
Distinct digits of n arranged in decreasing order.
12
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, 72, 82, 92, 30, 31, 32, 3, 43, 53, 63, 73, 83, 93, 40, 41, 42, 43, 4, 54, 64, 74, 84, 94, 50, 51, 52, 53, 54, 5, 65, 75, 85, 95, 60, 61, 62, 63, 64, 65, 6, 76, 86
OFFSET
0,3
COMMENTS
a(n) <= 9876543210; a(a(n)) = a(n);
A055642(a(n)) <= 10;
A055642(a(n)) <= A055642(n), A055642(a(n)) = A055642(n) iff A178788(n) = 1;
a(A109303(n)) < A109303(n); a(A009995(n)) = A009995(n); a(A071589(n)) > A071589(n);
a(n) = A151949(n) + A180410(n).
LINKS
MAPLE
a:= n-> parse(cat(sort([{convert(n, base, 10)[]}[]], `>`)[])):
seq(a(n), n=0..68); # Alois P. Heinz, Sep 21 2022
MATHEMATICA
f[n_] := FromDigits[Reverse@ Union@ IntegerDigits@ n]; f /@ Range[0, 68] (* Michael De Vlieger, Apr 16 2015, corrected by Robert G. Wilson v *)
PROG
(Haskell)
import Data.List (nub, sort)
a227362 = read . reverse . sort . nub . show :: Integer -> Integer
(PARI) a(n) = {if (n == 0, d = [0], d = digits(n)); eval(subst(Pol(vecsort(d, , 12)), x, 10)); } \\ Michel Marcus, Apr 16 2015
(PARI) a(n)=fromdigits(vecsort(digits(n), , 12)) \\ Charles R Greathouse IV, Apr 16 2015
(Python)
def A227362(n): return int(''.join(sorted(set(str(n)), reverse=True))) # Chai Wah Wu, Nov 23 2022
CROSSREFS
Sequence in context: A106612 A137564 A056960 * A297236 A103693 A117230
KEYWORD
nonn,base,look
AUTHOR
Reinhard Zumkeller, Jul 09 2013
STATUS
approved