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!)
A163498 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. 2
2, 3, 11, 13, 23, 37, 43, 59, 79, 89, 103, 109, 113, 139, 149, 181, 193, 197, 227, 239, 263, 269, 281, 283, 307, 401, 433, 443, 449, 457, 463, 503, 523, 547, 587, 617, 653, 673, 691, 811, 821, 823, 829, 839, 877, 887, 911, 937, 967, 1021, 1049, 1061, 1063 (list; graph; refs; listen; history; text; internal format)
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
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
Cf. A163499.
Sequence in context: A107715 A090707 A062350 * A038874 A164624 A215819
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

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 April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)