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!)
A226972 Emirps whose binary conversion remains emirp when read in decimal. 1

%I #16 Dec 16 2014 15:06:49

%S 157,709,1283,1321,3469,3929,9643,15101,15241,15383,17443,18439,19237,

%T 30643,35911,38393,39799,71711,73849,78901,92381,92503,93971,94219,

%U 98317,105929,106427,106721,111821,112481,123923,128879,130693,146989,149893,152407,165449

%N Emirps whose binary conversion remains emirp when read in decimal.

%H K. D. Bajpai, <a href="/A226972/b226972.txt">Table of n, a(n) for n = 1..1691</a> (numbers < 4*10^7)

%e For n=1 the a(1)=157 and its reversal 751, both are different and primes. The binary conversion of 157 is 10011101 and its reversal 10111001, both are different and primes.

%p with(numtheory):with(StringTools):

%p # ==== DECI EMIRP ===== BINARY EMIRP ===

%p PRS:= proc(x,y)

%p local i,a,a1,a2,b,c,d,e,f,g,h,m,count;

%p count:=1;

%p for i from x to y do;

%p a:=ithprime(i);

%p a1:=parse(Reverse(convert((a),string)));

%p a2:=isprime(a1);

%p b:=convert(a,binary);

%p c:=isprime(b);

%p d:=parse(Reverse(convert((b),string)));

%p e:=isprime(d);

%p g:=length(a);

%p h:= length(d);

%p if a2 and c and e and a<>a1 and d<>b then lprint(count,a) ;count:=count+1;fi ; od;

%p lprint("Finished " ):

%p end:

%p PRS(1,100000);

%t Select[Prime@Range@20000, PrimeQ[r = FromDigits@Reverse@IntegerDigits[#]] && r != # && PrimeQ[b = FromDigits[d = IntegerDigits[#, 2]]] && b != (br = FromDigits@ Reverse@d) && PrimeQ[br] &] (* _Giovanni Resta_, Jun 25 2013 *)

%Y Cf. A006567 (Emirps, primes whose reversal is a different prime).

%K nonn,base

%O 1,1

%A _K. D. Bajpai_, Jun 24 2013

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 August 15 07:32 EDT 2024. Contains 375173 sequences. (Running on oeis4.)