OFFSET
1,1
COMMENTS
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
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2000
EXAMPLE
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.
MATHEMATICA
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 *)
Select[Prime[Range[200]], PrimeQ[FromDigits[Flatten[IntegerDigits[#, 2]/.(1-> {0, 1})], 2]]&] (* Harvey P. Dale, Aug 22 2018 *)
PROG
(Python) from sympy import prime, isprime
[prime(n) for n in range(1, 1000) if isprime(int(bin(prime(n)).replace('1', '01'), 2))] # Chai Wah Wu, Jul 28 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 29 2009
EXTENSIONS
More terms from Stefan Steinerberger, Aug 05 2009
More terms from Chai Wah Wu, Jul 28 2014
STATUS
approved