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.

A350246 a(n) is the minimum positive integer k such that the concatenation of k, a(n-1), a(n-2), ..., a(2), and a(1) is the lesser of a pair of twin primes (i.e., a term of A001359), with a(1) = 11.

Original entry on oeis.org

11, 3, 18, 15, 42, 189, 306, 369, 6, 1176, 93, 963, 2202, 750, 408, 498, 267, 1875, 240, 2751, 798, 1929, 3402, 6162, 6195, 4953, 5004, 8130, 18591, 20019, 4461, 1851, 46866, 29232, 7206, 24807, 4644, 23307, 48528, 21594, 28236, 4353, 28212, 3003, 22611, 50760
Offset: 1

Views

Author

Keywords

Comments

First observed by J. A. Hervás Contreras (see the links).
Every term (from the second on) is a multiple of 3.

Examples

			11, 311, 18311, 1518311, and 421518311 are terms of A001359.
		

Crossrefs

Cf. A001359.

Programs

  • Maple
    terms := proc(n)
       local i, j, p, q, L, M:
       i, L, M := 0, [11], [11]:
       while numelems(L) < n do
          i, j := i+1, 0:
          while 1 > 0 do
             j, p := j+1, M[numelems(M)]:
             q := parse(cat(j, p)):
             if isprime(q) and isprime(q+2) then
                L, M := [op(L), j], [op(M), q]:
                break: fi: od: od:
       L: end:
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A350246_gen(): # generator of terms
        yield 11
        s = '11'
        while True:
            for k in count(3,3):
                t = str(k)
                m = int(t+s)
                if isprime(m) and isprime(m+2):
                    yield k
                    break
            s = t+s
    A350246_list = list(islice(A350246_gen(),20)) # Chai Wah Wu, Jan 12 2022