login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A070196
a(n) = n plus the sorted version of the base-10 digits of n.
4
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 22, 24, 26, 28, 30, 32, 34, 36, 38, 22, 33, 44, 46, 48, 50, 52, 54, 56, 58, 33, 44, 55, 66, 68, 70, 72, 74, 76, 78, 44, 55, 66, 77, 88, 90, 92, 94, 96, 98, 55, 66, 77, 88, 99, 110, 112, 114, 116, 118, 66, 77, 88, 99, 110, 121, 132, 134
OFFSET
0,2
LINKS
Eric Weisstein's World of Mathematics, Sort-Then-Add Sequence
FORMULA
a(n) = n + A004185(n). - Reinhard Zumkeller, Apr 03 2015
MAPLE
a:= n-> n+parse(cat(sort(convert(n, base, 10))[])):
seq(a(n), n=0..67); # Alois P. Heinz, Jan 15 2024
MATHEMATICA
Table[n+FromDigits[Sort[IntegerDigits[n]]], {n, 0, 70}] (* Harvey P. Dale, Feb 08 2020 *)
PROG
(Haskell)
a070196 n = n + a004185 n -- Reinhard Zumkeller, Apr 03 2015
(Python)
def a(n): return n + int("".join(sorted(str(n))))
print([a(n) for n in range(68)]) # Michael S. Branicky, Jan 15 2024
CROSSREFS
Cf. A033862.
Cf. A004185, A033860 (iterated, starting with 1).
Sequence in context: A064806 A062028 A262223 * A345111 A056964 A052008
KEYWORD
nonn,base
AUTHOR
Eric W. Weisstein, Apr 27 2002
EXTENSIONS
Zero prepended and offset changed by Reinhard Zumkeller, Apr 03 2015
STATUS
approved