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.

A033862 Sorted number reached from starter n in Sort-then-add sequence, or -1 if never reaches sorted number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 33, 22, 23, 24, 25, 26, 27, 28, 29, 33, 44, 55, 33, 34, 35, 36, 37, 38, 39, 44, 55, 66, 77, 44, 45, 46, 47, 48, 49, 55, 66, 77, 88, 99, 55, 56, 57, 58, 59, 66, 77, 88, 99, 233, 233, 66, 67, 68, 69, 77, 88
Offset: 1

Views

Author

Keywords

Comments

Probably a(316) = -1.

Programs

  • Python
    from itertools import islice
    def a(n):
        while n != (s:=int("".join(sorted(str(n))))): n += s
        return s
    print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Jan 15 2024