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.

A362064 Lexicographically earliest sequence of distinct positive integers such that the digit "1" is neither present in a(n) nor in a(n) + a(n+1).

Original entry on oeis.org

2, 3, 4, 5, 20, 6, 22, 7, 23, 9, 24, 8, 25, 27, 26, 28, 29, 30, 32, 33, 34, 35, 37, 36, 38, 39, 40, 42, 43, 44, 45, 47, 46, 48, 49, 50, 200, 52, 202, 53, 203, 54, 204, 55, 205, 57, 206, 56, 207, 58, 208, 59, 209, 60, 220, 62, 222, 63, 223, 64, 224, 65, 225, 67
Offset: 1

Views

Author

Eric Angelini and Cécile Angelini, Apr 07 2023

Keywords

Examples

			2 + 3 = 5; 3 + 4 = 7; 4 + 5 = 9; but as 5 + 6 = 11 we cannot use 6 nor 7 (sum 12), 8 (sum 13) and 9 (sum 14); we cannot use the integers 10 to 19 (as a 1 is present in them), so a(5) = 20 as 5 + 20 = 25, etc.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def jump1(n):
        s = str(n)
        return n if "1" not in s else int(s[:(i:=s.index("1"))]+"2"+"0"*(len(s)-i-1))
    def agen(): # generator of terms
        an, aset, mink = 2, {2}, 3
        while True:
            yield an
            k = mink
            while k in aset or "1" in str(an+k): k = jump1(k+1)
            an = k
            aset.add(an)
            while mink in aset: mink = jump1(mink+1)
    print(list(islice(agen(), 64))) # Michael S. Branicky, Apr 07 2023

Extensions

a(27) and beyond from Michael S. Branicky, Apr 07 2023