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!)
A334150 Primes p such that p AND q = 1, where q is the next prime after p and AND is the bitwise operation. 0

%I #21 Apr 18 2020 14:36:42

%S 3,13,61,251,4093,32749,65521,8388593,33554393,1073741789,

%T 137438953447,9007199254740881,36028797018963913,144115188075855859,

%U 147573952589676412909,37778931862957161709471,75557863725914323419121,2417851639229258349412301,4835703278458516698824647

%N Primes p such that p AND q = 1, where q is the next prime after p and AND is the bitwise operation.

%t s = {}; p = 2; Do[q = NextPrime[p]; If[BitAnd[p, q] == 1, AppendTo[s, p]]; p = q, {10^5}]; s (* _Amiram Eldar_, Apr 16 2020 *)

%t Select[ NextPrime[ 2^Range[82], -1], BitAnd[#, NextPrime@ #] == 1 &] (* _Giovanni Resta_, Apr 16 2020 *)

%o (PARI) isok(p) = isprime(p) && (bitand(p, nextprime(p+1)) == 1);

%Y Cf. A175330.

%Y Subsequence of A014234 (largest prime <= 2^n).

%Y Cf. A214415 (exponents of corresponding powers of 2).

%K nonn,base

%O 1,1

%A _Michel Marcus_, Apr 16 2020

%E a(9)-a(10) from _Amiram Eldar_, Apr 16 2020

%E a(11)-a(19) from _Giovanni Resta_, Apr 16 2020

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)