OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
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 *)
Select[Partition[Prime[Range[1500]], 2, 1], #[[2]]-#[[1]]==2&&PrimeQ[IntegerReverse[#[[1]]]]&][[;; , 1]] (* Harvey P. Dale, Sep 01 2025 *)
PROG
(PARI) 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) }
twlrpr(n) = { for(x=1, n, y=twinl(x); z=eval(rev(y)); if(isprime(z), print1(y", ")) ) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Cino Hilliard, Jan 26 2005
EXTENSIONS
Definition clarified by Harvey P. Dale, Sep 01 2025
STATUS
approved
