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!)
A071849 Numbers k such that A245788(k) > prime(k). 1

%I #19 Jun 03 2022 03:20:23

%S 3,7,11,15,23,27,29,30,31,47,55,59,61,62,63,95,111,119,123,125,126,

%T 127,159,175,183,187,189,191,223,239,247,251,253,254,255,319,351,367,

%U 375,379,381,382,383,415,431,439,447,479,495,503,507,509,510,511,639,703

%N Numbers k such that A245788(k) > prime(k).

%H Robert Israel, <a href="/A071849/b071849.txt">Table of n, a(n) for n = 1..10000</a>

%p p:= 1: Res:= NULL: count:= 0:

%p for n from 1 while count < 100 do

%p p:= nextprime(p);

%p if n*convert(convert(n,base,2),`+`) > p then

%p count:= count+1; Res:= Res, n;

%p fi

%p od:

%p Res; # _Robert Israel_, Oct 30 2018

%t Select[Range[700], # * DigitCount[#, 2, 1] > Prime[#] &] (* _Amiram Eldar_, Jun 03 2022 *)

%o (PARI) for(n=1,1000,b=binary(n); if(sum(i=1,length(b), component(b,i))*n>prime(n),print1(n,",")))

%o (PARI) is(n,p=prime(n))=hammingweight(n)*n>p \\ _Charles R Greathouse IV_, Oct 30 2018

%o (PARI) list(lim)=my(v=List(),n); forprime(p=2,, if(n++>lim, return(Vec(v))); if(hammingweight(n)*n>p, listput(v,n))); \\ _Charles R Greathouse IV_, Oct 30 2018

%Y Cf. A000040, A000120, A245788.

%K base,easy,nonn

%O 1,1

%A _Benoit Cloitre_, Jun 09 2002

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 September 13 16:05 EDT 2024. Contains 375910 sequences. (Running on oeis4.)