cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A070196 a(n) = n plus the sorted version of the base-10 digits of n.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Apr 27 2002

Keywords

Crossrefs

Cf. A033862.
Cf. A004185, A033860 (iterated, starting with 1).

Programs

  • Haskell
    a070196 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 *)
  • 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

Formula

a(n) = n + A004185(n). - Reinhard Zumkeller, Apr 03 2015

Extensions

Zero prepended and offset changed by Reinhard Zumkeller, Apr 03 2015

A033861 Sort-then-add sequence: a(1) = 316, a(n+1) = a(n) + sort(a(n)).

Original entry on oeis.org

316, 452, 697, 1376, 2743, 5090, 5149, 6608, 7276, 9953, 13552, 25907, 28486, 53174, 66631, 80297, 83086, 86774, 133552, 256907, 282586, 508274, 532852, 756410, 770977, 848756, 1305544, 1439999, 2789998, 5578997, 11156896
Offset: 1

Views

Author

Keywords

Comments

316 is almost certainly the least starter not leading to a sorted element.

Examples

			a(1) = 316, a(2) = a(1)+sort(a(1)) = 316 + 136 = 452, a(3) = a(2) + sort(a(2)) = 452 + 245 = 697. - _Indranil Ghosh_, Jan 29 2017
		

Crossrefs

Programs

  • Mathematica
    NestList[#+FromDigits[Sort[IntegerDigits[#]]]&,316,40] (* Harvey P. Dale, Jan 28 2013 *)
  • Python
    A033861_list = [316]
    for i in range(100):
        x = A033861_list[-1]
        A033861_list.append(x+int(''.join(sorted(str(x))))) # Chai Wah Wu, Feb 07 2020
Showing 1-2 of 2 results.