login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes that are the concatenation of two consecutive palindromic primes.
1

%I #11 Mar 31 2023 18:54:48

%S 23,3151332323,3242333533,3727337573,3757338083,7888779397,

%T 11202111123211,11232111126211,11606111163611,11787111180811,

%U 12626211268621,12737211276721,13111311317131,13353311338331

%N Primes that are the concatenation of two consecutive palindromic primes.

%H Robert Israel, <a href="/A030464/b030464.txt">Table of n, a(n) for n = 1..10000</a>

%p digrev:= proc(n) local L,i;

%p L:= convert(n,base,10);

%p add(L[-i]*10^(i-1),i=1..nops(L))

%p end proc:

%p dcat:= proc(x,y) 10^(1+ilog10(y))*x+y end proc:

%p R:= 23: count:= 1: lastpp:= 3:

%p for d from 2 while count < 100 do

%p for i in [1,3,7,9] while count < 100 do

%p for m from i*10^(d-1)+1 to (i+1)*10^(d-1)-1 while count < 100 do

%p for j from 0 to 9 while count < 100 do

%p x:= m*10^(d+1)+j*10^d+digrev(m);

%p if isprime(x) then

%p y:= dcat(lastpp,x);

%p lastpp:= x;

%p if isprime(y) then R:= R,y; count:= count+1 fi

%p fi

%p od od od od:

%p R; # _Robert Israel_, Apr 01 2021

%t Select[FromDigits[Flatten[IntegerDigits/@#]]&/@Partition[Select[Prime[Range[ 110000]],PalindromeQ],2,1],PrimeQ] (* _Harvey P. Dale_, Mar 31 2023 *)

%Y Cf. A002385.

%K nonn,base

%O 1,1

%A _Patrick De Geest_

%E Edited by _Charles R Greathouse IV_, Apr 28 2010