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.

A252781 Inverse permutation to A106001.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 49, 10, 12, 16, 18, 24, 28, 34, 40, 42, 96, 11, 15, 23, 27, 39, 47, 60, 74, 79, 115, 13, 20, 30, 32, 53, 57, 64, 83, 106, 126, 14, 21, 37, 45, 72, 91, 98, 118, 123, 190, 17, 31, 51, 56, 88, 93, 108, 138, 162, 214, 19, 33, 52, 66
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 16 2015

Keywords

Crossrefs

Cf. A106001.

A362551 a(0)=0. For each digit d in the sequence, append the smallest unused integer such that its last digit equals d.

Original entry on oeis.org

0, 10, 1, 20, 11, 2, 30, 21, 31, 12, 3, 40, 22, 41, 13, 51, 61, 32, 23, 4, 50, 42, 52, 14, 71, 81, 33, 5, 91, 6, 101, 43, 62, 72, 53, 24, 15, 60, 34, 82, 25, 92, 111, 44, 7, 121, 8, 131, 63, 73, 35, 9, 141, 16, 151, 70, 161, 54, 83, 26, 102, 17, 112, 45, 93
Offset: 0

Views

Author

Gavin Lupo, Apr 24 2023

Keywords

Comments

This sequence is a permutation of the nonnegative integers.

Examples

			a(0) =  0
a(1) = 10 (d=0 from a(0)=0, smallest integer other than 0 that ends with 0).
a(2) =  1 (d=1 from a(1)=10, smallest integer that ends with a 1).
a(3) = 20 (d=0 from a(1)=10, smallest integer other than 0 and 10 that ends with 0).
a(4) = 11 (d=1 from a(2)=1, smallest integer other than 1 that ends with 1).
a(5) =  2 (d=2 from a(3)=20, smallest integer that ends with 2).
a(6) = 30 (d=0 from a(3)=20, smallest integer other than 0, 10, and 20 that ends with 0).
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        s, lastd = "0", [(k for k in count(i, 10)) for i in range(10)]
        for n in count(0):
            an = next(lastd[int(s[0])])
            s = s[1:] + str(an)
            yield an
    print(list(islice(agen(), 65))) # Michael S. Branicky, Apr 25 2023
Showing 1-2 of 2 results.