OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
p:= 1: Res:= NULL: count:= 0:
for n from 1 while count < 100 do
p:= nextprime(p);
if n*convert(convert(n, base, 2), `+`) > p then
count:= count+1; Res:= Res, n;
fi
od:
Res; # Robert Israel, Oct 30 2018
MATHEMATICA
Select[Range[700], # * DigitCount[#, 2, 1] > Prime[#] &] (* Amiram Eldar, Jun 03 2022 *)
PROG
(PARI) for(n=1, 1000, b=binary(n); if(sum(i=1, length(b), component(b, i))*n>prime(n), print1(n, ", ")))
(PARI) is(n, p=prime(n))=hammingweight(n)*n>p \\ Charles R Greathouse IV, Oct 30 2018
(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
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Benoit Cloitre, Jun 09 2002
STATUS
approved