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!)
A095286 Primes in whose binary expansion the number of 1 bits is > 1 + number of 0 bits. 6
3, 7, 11, 13, 23, 29, 31, 43, 47, 53, 59, 61, 79, 103, 107, 109, 127, 151, 157, 167, 173, 179, 181, 191, 199, 211, 223, 227, 229, 233, 239, 241, 251, 311, 317, 347, 349, 359, 367, 373, 379, 383, 431, 439, 443, 461, 463, 467, 479, 487, 491, 499 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
13 is in the sequence because 13 is prime and 13 = 1101_2. '1101' has three 1's and one 0. 3 > 1 + 1. - Indranil Ghosh, Feb 07 2017
PROG
(PARI)B(x) = {nB = floor(log(x)/log(2)); b1 = 0; b0 = 0;
for(i = 0, nB, if(bittest(x, i), b1++; , b0++; ); );
if(b1 > (b0+1), return(1); , return(0); ); };
forprime(x = 3, 499, if(B(x), print1(x, ", "); ); );
\\ Washington Bomfim, Jan 11 2011
(Python)
from sympy import isprime
i = 1
j = 1
while j <= 2000:
bi = bin(i)[2:]
if isprime(i) and bi.count("1") > 1 + bi.count("0"):
print(str(j) + " " + str(i))
j += 1
i += 1 # Indranil Ghosh, Feb 07 2017
CROSSREFS
Complement of A095287 in A000040. Subset of A095070. Subset: A095314. Cf. also A095296.
Sequence in context: A109492 A176799 A310200 * A177681 A225222 A106561
KEYWORD
nonn,easy,base
AUTHOR
Antti Karttunen, Jun 04 2004
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 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)