login
A083439
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.
0
3, 7, 19, 13, 61, 151, 31, 139, 67, 37, 79, 193, 163, 127, 157, 97, 43, 103, 307, 367, 457, 643, 73, 277, 223, 229, 373, 199, 109, 313, 211, 271, 241, 421, 181, 283, 397, 337, 349, 331, 577, 523, 463, 613, 439, 541, 571, 433, 787, 547, 661, 769, 487, 601, 823, 709
OFFSET
3,1
PROG
(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
CROSSREFS
Sequence in context: A217371 A088629 A075609 * A151858 A365139 A242170
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 30 2003
EXTENSIONS
Corrected and extended by Max Alekseyev, Apr 24 2009
STATUS
approved