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-1 of 1 results.

A362417 Beginning with 1, smallest positive integer not yet in the sequence such that two adjacent digits A and B of the sequence (also ignoring commas between terms) produce a prime = A + 2B. This is the earliest infinitely extensible such sequence.

Original entry on oeis.org

1, 3, 5, 7, 20, 11, 9, 13, 15, 19, 50, 111, 30, 113, 51, 31, 35, 37, 53, 57, 59, 70, 115, 73, 75, 91, 95, 97, 201, 119, 120, 130, 131, 135, 137, 301, 150, 151, 153, 157, 311, 159, 191, 195, 197, 313, 501, 315, 319, 511, 320, 1111, 350, 1113, 513, 515, 351, 353
Offset: 1

Views

Author

Eric Angelini, Apr 19 2023

Keywords

Comments

The integer 10 is the first one that will never appear in the sequence (as the result of 1 + 2*0 is not a prime). The next absent will be 14.
From Michael S. Branicky, Apr 19 2023: (Start)
The only allowed pairs of digits AB are 01, 11, 12, 13, 15, 16, 18, 19, 20, 30, 31, 32, 34, 35, 37, 38, 50, 51, 53, 54, 56, 57, 59, 70, 72, 73, 75, 76, 78, 91, 92, 94, 95, 97.
Further, any appearance of 4, 6, or 8 as a digit would end the sequence, as would a term with last digit 2 (since the next term cannot start with 0).
As long as no term ends in 2, 4, 6, or 8, the sequence is infinitely extensible since the edge and cycle 01 -> 13 -> 31 -> 13 (at least) can be used to extend terms ending in 0, 1, or 3; and 75 -> 59 -> 97 to extend terms ending in 5, 7, or 9. (End)

Examples

			Digit A = 1 and B = 3 lead to 7 (prime) = A+2B;
Digit A = 3 and B = 5 lead to 13 (prime) = A+2B;
Digit A = 5 and B = 7 lead to 19 (prime) = A+2B;
Digit A = 7 and B = 2 lead to 11 (prime) = A+2B;
Digit A = 2 and B = 0 lead to 2 (prime) = A+2B;
Digit A = 0 and B = 1 lead to 2 (prime) = A+2B;
Digit A = 1 and B = 1 lead to 3 (prime) = A+2B; etc.
		

Crossrefs

Cf. A182178 (B is multiplied by 1), A362418 (B is multiplied by 3).

Programs

  • Python
    from sympy import isprime
    from itertools import islice
    def c(s):
        if s[-1] == "2" or "4" in s or "6" in s or "8" in s: return False
        return all(isprime(int(s[i])+2*int(s[i+1])) for i in range(len(s)-1))
    def agen(): # generator of terms
        last, aset = "1", {1}
        yield 1
        while True:
            k = 2
            while k in aset or not c(last+str(k)): k += 1
            an = k; yield an; last += str(an); aset.add(an)
    print(list(islice(agen(), 58))) # Michael S. Branicky, Apr 19 2023

Extensions

a(7) inserted and a(30) and beyond from Michael S. Branicky, Apr 19 2023
Showing 1-1 of 1 results.