%I #10 Jun 10 2018 11:32:33
%S 3,7,19,13,61,151,31,139,67,37,79,193,163,127,157,97,43,103,307,367,
%T 457,643,73,277,223,229,373,199,109,313,211,271,241,421,181,283,397,
%U 337,349,331,577,523,463,613,439,541,571,433,787,547,661,769,487,601,823,709
%N a(1) = 3; then a(n+1) = smallest prime not already in the sequence such that the concatenations a(n)a(n+1) and a(n+1)a(n) are both primes.
%o (PARI) { p=3; S=Set(); while(!setsearch(S,p), S=setunion(S,Set([p])); print1(p,", "); forprime(q=2,10^4, if(setsearch(S,q),next); if( isprime(eval(concat(Str(p),Str(q)))) && isprime(eval(concat(Str(q),Str(p)))), p=q; break))) } \\ _Max Alekseyev_, Apr 24 2009
%Y Cf. A073641, A075609.
%K base,nonn
%O 3,1
%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 30 2003
%E Corrected and extended by _Max Alekseyev_, Apr 24 2009