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!)
A292349 Pri-most primes: primes p such that the majority of bits in the binary representation of p satisfy the following: complementing this bit produces a prime number. 1

%I #18 May 24 2021 07:33:39

%S 7,19,23,43,71,101

%N Pri-most primes: primes p such that the majority of bits in the binary representation of p satisfy the following: complementing this bit produces a prime number.

%C Primes in A292348.

%C Conjecture: the sequence is finite.

%t Select[Prime@ Range[10^5], Function[n, Function[d, 2 Count[Array[FromDigits[#, 2] &@ MapAt[Mod[# + 1, 2] &, d, #] &, Length@ d], _?PrimeQ] > Length@ d]@ IntegerDigits[n, 2]]] (* _Michael De Vlieger_, Dec 08 2017 *)

%o (Python)

%o from sympy import isprime, primerange

%o for i in primerange(1, 1000):

%o delta = 0

%o bit = 1

%o while bit <= i:

%o if isprime(i^bit): delta += 1

%o else: delta -= 1

%o bit*=2

%o if delta > 0: print(str(i), end=',')

%Y Cf. A000040, A137985, A292348.

%K nonn,base,more

%O 1,1

%A _Alex Ratushnyak_, Dec 07 2017

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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)