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.

A353780 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that is coprime to a(n-1), does not equal a(n-1)+1, and has no digit in common with a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 07 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(15) = 27 as a(14) = 10, and 27 has not yet appeared, is coprime to 10, is not 1 more than 10, and has no digit in common with 10. Note that 21 satisfies all of these conditions except the last. This is the first term to differ from A353904.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import islice
    def c(san, k): return set(san) & set(str(k)) == set()
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 2
        while True:
            yield an
            k, san = mink, str(an)
            while k in aset or gcd(an, k) != 1 or k-an == 1 or not c(san, k):
                k += 1
            an = k
            aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 75))) # Michael S. Branicky, May 23 2022