|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|