OFFSET
0,3
COMMENTS
EXAMPLE
a(1010) = 1100,
a(1234567890) = 1234567890,
a(9876543210) = 1234567890.
MATHEMATICA
a[n_] := 10^DigitCount[n, 10, 0] * FromDigits[Sort[IntegerDigits[n]]]; Array[a, 100, 0] (* Amiram Eldar, Oct 10 2021 *)
PROG
(PARI) a(n) = fromdigits(vecsort(digits(n), x->if(x, x, 10)));
(Ruby) p Array.new(40) { |n|
n.to_s.gsub('0', 'a').split(//).sort.join.gsub('a', '0').to_i
}
(Python)
def a(n): s = str(n); return int("".join(sorted(s)))*10**s.count('0')
print([a(n) for n in range(68)]) # Michael S. Branicky, Oct 10 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Simon Strandgaard, Oct 10 2021
STATUS
approved