login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101781 Lower bound of twin primes pairs whose digital reverse is also prime. 1

%I #8 Oct 01 2013 17:58:06

%S 3,5,11,17,71,101,107,149,179,191,311,347,1031,1061,1091,1151,1229,

%T 1301,1487,1619,1949,3251,3257,3299,3359,3371,3389,3467,3527,3767,

%U 3821,3851,3917,3929,7349,7457,7547,7589,7757,7949,9011,9041,9341,9437,9857,10007

%N Lower bound of twin primes pairs whose digital reverse is also prime.

%H Harvey P. Dale, <a href="/A101781/b101781.txt">Table of n, a(n) for n = 1..1000</a>

%e 17 is the lower bound of twin prime pair (17,19) and its digital reverse, 71, is prime.

%t Select[Transpose[Select[Partition[Prime[Range[1500]],2,1],Last[#]- First[#] == 2&]][[1]],PrimeQ[FromDigits[Reverse[IntegerDigits[#]]]]&] (* _Harvey P. Dale_, Jun 26 2013 *)

%o (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) }

%K nonn,base

%O 1,1

%A _Cino Hilliard_, Jan 26 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 14:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)