|
|
A101781
|
|
Lower bound of twin primes pairs whose digital reverse is also prime.
|
|
1
|
|
|
3, 5, 11, 17, 71, 101, 107, 149, 179, 191, 311, 347, 1031, 1061, 1091, 1151, 1229, 1301, 1487, 1619, 1949, 3251, 3257, 3299, 3359, 3371, 3389, 3467, 3527, 3767, 3821, 3851, 3917, 3929, 7349, 7457, 7547, 7589, 7757, 7949, 9011, 9041, 9341, 9437, 9857, 10007
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
17 is the lower bound of twin prime pair (17,19) and its digital reverse, 71, is prime.
|
|
MATHEMATICA
|
Select[Transpose[Select[Partition[Prime[Range[1500]], 2, 1], Last[#]- First[#] == 2&]][[1]], PrimeQ[FromDigits[Reverse[IntegerDigits[#]]]]&] (* Harvey P. Dale, Jun 26 2013 *)
|
|
PROG
|
(PARI) twlrpr(n) = { for(x=1, n, y=twinl(x); z=eval(rev(y)); if(isprime(z), print1(y", ")) ) } twinl(n) = \The n-th lower twin prime { local(c, x); c=0; x=1; while(c<n, if(isprime(prime(x)+2), c++); x++; ); return(prime(x-1)) } rev(str) = \ Get the reverse of the input string { local(tmp, s, j); tmp = Vec(Str(str)); s=""; forstep(j=length(tmp), 1, -1, s=concat(s, tmp[j])); return(s) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|