Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #19 Aug 22 2018 20:44:10
%S 2,3,11,13,23,37,43,59,79,89,103,109,113,139,149,181,193,197,227,239,
%T 263,269,281,283,307,401,433,443,449,457,463,503,523,547,587,617,653,
%U 673,691,811,821,823,829,839,877,887,911,937,967,1021,1049,1061,1063
%N Those primes p that after each is written in binary, and a 0 is inserted before every 1, then the value of this new number is also prime.
%C Equal to primes p such that when written in binary, and a 0 is inserted after every binary digit 1, results in 2 times a prime number. For example, 13 is in the list as 13 is 1101 in binary. Inserting 0 after every 1 results in 1010010 = 82 decimal, which is 2*41 and 41 is prime. - _Chai Wah Wu_, Jul 29 2014
%H Chai Wah Wu, <a href="/A163498/b163498.txt">Table of n, a(n) for n = 1..2000</a>
%e 13 in binary is 1101. Insert a 0 before every 1, and we have 0101001, which is 41 in decimal (ignoring the leading 0 in the binary representation). Since 41 is also prime, then 13 is included in this sequence.
%t a = {}; For[n = 1, n < 1000, n++, b = IntegerDigits[Prime[n], 2]; c = {}; For[k = 1, k < Length[b] + 1, k++, AppendTo[c, 0]; If[b[[k]] == 1, AppendTo[c, 1]]]; If[PrimeQ[FromDigits[c, 2]], AppendTo[a, Prime[n]]]]; a (* _Stefan Steinerberger_, Aug 05 2009 *)
%t Select[Prime[Range[200]],PrimeQ[FromDigits[Flatten[IntegerDigits[#,2]/.(1-> {0,1})],2]]&] (* _Harvey P. Dale_, Aug 22 2018 *)
%o (Python) from sympy import prime, isprime
%o [prime(n) for n in range(1,1000) if isprime(int(bin(prime(n)).replace('1','01'),2))] # _Chai Wah Wu_, Jul 28 2014
%Y Cf. A163499.
%K base,nonn
%O 1,1
%A _Leroy Quet_, Jul 29 2009
%E More terms from _Stefan Steinerberger_, Aug 05 2009
%E More terms from _Chai Wah Wu_, Jul 28 2014