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.

A331215 Lexicographically earliest sequence of distinct positive integers such that four successive digits are always distinct.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 14, 20, 13, 24, 15, 26, 17, 25, 16, 27, 18, 29, 30, 12, 34, 19, 28, 31, 40, 21, 35, 41, 32, 45, 36, 42, 37, 46, 38, 47, 39, 48, 50, 43, 51, 49, 52, 60, 53, 61, 54, 62, 57, 63, 58, 64, 59, 67, 80, 56, 70, 81, 65, 71, 68, 72, 69, 73, 82, 74, 83, 75, 84, 76, 85, 79, 86, 102
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 03 2020

Keywords

Comments

This is not A276766, though the first 63 terms are the same.

Examples

			The four digits of a(11) = 23 and a(12) = 14 are distinct;
the four digits of a(12) = 14 and a(13) = 20 are distinct;
but so are also the successive digits 3,1,4,2 visible in 23, 14, 20;
the four digits of a(13) = 20 and a(14) = 13 are distinct;
the four digits of a(14) = 13 and a(15) = 24 are distinct;
but so are also the successive digits 0,1,3,2 visible in 20,13,24; etc.
		

Crossrefs

Cf. A331975 (a variant with 3 successive distinct digits instead of 4), A276766.

Programs

  • Python
    from itertools import islice
    def ok(s): return all(len(set(s[i:i+4]))==4 for i in range(len(s)-3))
    def agen(): # generator of terms
        aset, s, k, mink = {1}, "xy1", 1, 2
        while True:
            yield k
            k, avoid = mink, set(s)
            while k in aset or not ok(s + str(k)): k += 1
            aset.add(k)
            s = (s + str(k))[-4:]
            while mink in aset: mink += 1
    print(list(islice(agen(), 79))) # Michael S. Branicky, Jun 30 2022

A331989 Lexicographically earliest sequence of distinct positive integers such that five successive digits are always distinct.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 41, 50, 24, 13, 52, 40, 15, 26, 30, 12, 43, 51, 20, 34, 16, 25, 31, 42, 53, 14, 27, 35, 18, 29, 36, 17, 28, 39, 45, 21, 37, 46, 19, 32, 47, 56, 38, 49, 57, 60, 48, 59, 61, 70, 54, 62, 71, 58, 63, 72, 80, 64, 73, 81, 65, 74, 82, 67, 90, 83, 69, 75, 84, 91, 68, 79, 102, 76, 85
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 03 2020

Keywords

Examples

			The 5 digits 1, 0, 2, 3, 4 of a(10), a(11) and the 1st digit of a(12) are distinct;
the 5 digits 0, 2, 3, 4, 1 of the 2nd digit of a(10), a(11) and a(12) are distinct;
the 5 digits 2, 3, 4, 1, 5 of a(11), a(12) and the 1st digit of a(13) are distinct;
the 5 digits 3, 4, 1, 5, 0 of the 2nd digit of a(11), a(12) and a(13) are distinct;
the 5 digits 4, 1, 5, 0, 2 of a(12), a(13) and the 1st digit of a(14) are distinct, etc.
		

Crossrefs

Cf. A331975 (a variant with 3 successive distinct digits), A331215 (a variant with 4 successive distinct digits).
Showing 1-2 of 2 results.