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
Chai Wah Wu, Table of n, a(n) for n = 1..100
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lorenzo Sauras Altuzarra, Dec 21 2021
STATUS
approved