login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
3
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,1
COMMENTS
First observed by J. A. Hervás Contreras (see the links).
Every term (from the second on) is a multiple of 3.
LINKS
José Antonio Hervás Contreras, ¿Nueva propiedad de los primos gemelos?
EXAMPLE
11, 311, 18311, 1518311, and 421518311 are terms of A001359.
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:
PROG
(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
CROSSREFS
Cf. A001359.
Sequence in context: A375614 A110434 A110798 * A329293 A088653 A317311
KEYWORD
nonn,base
AUTHOR
STATUS
approved