cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A095321 #20 Apr 28 2025 14:42:49
%S A095321 257,521,577,641,769,1031,1033,1049,1061,1091,1093,1097,1153,1217,
%T A095321 1283,1289,1297,1409,1553,1601,2053,2069,2081,2083,2089,2113,2129,
%U A095321 2179,2309,2593,2689,3089,3137,3329,4099,4111,4129,4133,4139,4153
%N A095321 Primes in whose binary expansion the number of 1-bits is <= number of 0-bits minus 3.
%H A095321 Robert Israel, <a href="/A095321/b095321.txt">Table of n, a(n) for n = 1..10000</a>
%H A095321 A. Karttunen and J. Moyer: <a href="/A095062/a095062.c.txt">C-program for computing the initial terms of this sequence</a>
%p A095321 filter:= proc(p) local L;
%p A095321   L:= convert(p,base,2);
%p A095321   2*convert(L,`+`) <= nops(L)-3
%p A095321 end proc;
%p A095321 select(filter, [seq(ithprime(i),i=1..1000)]); # _Robert Israel_, Apr 27 2025
%t A095321 Select[Prime[Range[600]],DigitCount[#,2,1]<=DigitCount[#,2,0]-3&] (* _Harvey P. Dale_, Jul 04 2018 *)
%o A095321 (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 A095321 Complement of A095320 in A000040. Subset of A095317. Cf. also A095331.
%K A095321 nonn,base,easy
%O A095321 1,1
%A A095321 _Antti Karttunen_, Jun 04 2004