OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
Prime[A085412]
EXAMPLE
13 is a term because concatenation of 13 and 1 is prime.
MAPLE
R:= NULL: count:= 0:
for d from 1 while count < 100 do
for a in [1, 3, 7, 9] do
for x from 1 to 10^d-1 by 2 while count < 100 do
if isprime(a*10^d + x) and isprime(a*10^(d+1)+10*x+a) then
R:= R, a*10^d+x; count:= count+1
fi od od od:
R; # Robert Israel, Mar 24 2023
PROG
(Python)
from itertools import count, islice
from sympy import isprime, primerange
def agen(): # generator of terms
for d in count(1):
for f in [1, 3, 7, 9]:
for p in primerange(f*10**d, (f+1)*10**d):
if isprime(10*p+f):
yield p
print(list(islice(agen(), 50))) # Michael S. Branicky, Mar 24 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Jun 29 2003
STATUS
approved