OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..1000
EXAMPLE
The first few pairs are (2,3),(5,23),(7,19),(11,17),(13,61),(29,53), ..., giving the primes 23, 523, 719, 1117, 1361, 2953, ...
MAPLE
with(numtheory):nn:=60:lst:={2, 3}: printf ( "%d %d \n", 2, 3):
for a from 2 to nn do:
p:=ithprime(a):ii:=0:
for b from 1 to nn while(ii=0)do:
q:=ithprime(b):s:=p*10^(length(q))+q:
if type(s, prime)=true and lst intersect {p, q}={}
then
lst:=lst union {p, q}:ii:=1:printf(`%d, `, p):printf(`%d, `, q):
else
fi:
od:
od:
[I have been informed that this program may be incorrect. - N. J. A. Sloane, Jul 03 2024]
# alternative version
P:=proc(q) local a, b, k, i, j, n, ok; a:=[2, 3];
for n from 1 to q do k:=3; ok:=1; for i do if ok=1 then k:=nextprime(k);
if numboccur(k, a)=0 then b:=k;
for j from k do k:=nextprime(k); if numboccur(k, a)=0 then
if isprime(b*10^length(k)+k) then a:=[op(a), b, k]; ok:=0; break; fi; fi; od; fi;
else break; fi; od; od; print(op(a)); end: P(500); # Paolo P. Lava, Jul 03 2024
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Michel Lagneau, Jul 25 2014
EXTENSIONS
Edited by N. J. A. Sloane, Jul 03 2024. More than the usual number of terms are shown in order to distinguish this from A373794.
STATUS
approved