login
Primes in whose binary expansion the number of 1-bits is <= number of 0-bits minus 3.
3

%I #14 Jul 04 2018 20:13:01

%S 257,521,577,641,769,1031,1033,1049,1061,1091,1093,1097,1153,1217,

%T 1283,1289,1297,1409,1553,1601,2053,2069,2081,2083,2089,2113,2129,

%U 2179,2309,2593,2689,3089,3137,3329,4099,4111,4129,4133,4139,4153

%N Primes in whose binary expansion the number of 1-bits is <= number of 0-bits minus 3.

%H A. Karttunen and J. Moyer: <a href="/A095062/a095062.c.txt">C-program for computing the initial terms of this sequence</a>

%t Select[Prime[Range[600]],DigitCount[#,2,1]<=DigitCount[#,2,0]-3&] (* _Harvey P. Dale_, Jul 04 2018 *)

%o (PARI)forprime(p=2,4200,v=binary(p);s=0;for(k=1,#v, s+=if(v[k]==1,+1,-1)); if(s<=-3,print1(p,", "))) \\ _Washington Bomfim_, Jan 12 2011

%Y Complement of A095320 in A000040. Subset of A095317. Cf. also A095331.

%K nonn,base,easy

%O 1,1

%A _Antti Karttunen_, Jun 04 2004