login
A071849
Numbers k such that A245788(k) > prime(k).
1
3, 7, 11, 15, 23, 27, 29, 30, 31, 47, 55, 59, 61, 62, 63, 95, 111, 119, 123, 125, 126, 127, 159, 175, 183, 187, 189, 191, 223, 239, 247, 251, 253, 254, 255, 319, 351, 367, 375, 379, 381, 382, 383, 415, 431, 439, 447, 479, 495, 503, 507, 509, 510, 511, 639, 703
OFFSET
1,1
LINKS
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