OFFSET
1,1
EXAMPLE
19 is included because it is followed by the prime 23, both are two-digit numbers, and their digit dot product 1*2 + 9*3 = 29 which is prime.
MAPLE
q:= 2: Lq:= [2]: nq:= 1: count:= 0: R:= NULL:
while count < 100 do
p:= q; Lp:= Lq; np:= nq;
q:= nextprime(p); Lq:= convert(q, base, 10); nq:= nops(Lq);
if np = nq and isprime(add(Lp[i]*Lq[i], i=1..np)) then R:= R, p; count:= count+1 fi
od:
R; # Robert Israel, Apr 20 2026
MATHEMATICA
q[p_] := IntegerLength[p[[1]]] == IntegerLength[p[[2]]] && PrimeQ[IntegerDigits[p[[1]]].IntegerDigits[p[[2]]]]; Select[Partition[Prime[Range[200]], 2, 1], q][[;; , 1]] (* Amiram Eldar, Apr 20 2026 *)
PROG
(PARI) is(p)=my(q=nextprime(p+1), u=digits(p), v=digits(q)); if(#u==#v, my(r=u*v~); return(ispseudoprime(r))); 0
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jean-Marc Rebert, Apr 20 2026
STATUS
approved
