login
A090457
Primes prime(k) having fewer binary 1's than k.
4
17, 257, 277, 293, 307, 401, 449, 577, 641, 643, 653, 673, 677, 709, 1031, 1033, 1039, 1091, 1093, 1129, 1153, 1217, 1297, 1409, 1543, 1553, 1601, 1607, 1609, 1613, 2053, 2063, 2081, 2083, 2087, 2089, 2099, 2113, 2179, 2309, 2341, 2371, 2593, 2609, 2633, 2647
OFFSET
1,1
LINKS
FORMULA
A090455(a(n)) > 0.
MATHEMATICA
seq[len_] := Module[{s = {}, p = 2, k = 1, c = 0}, While[c < len, If[Greater @@ DigitCount[{k, p}, 2, 1], c++; AppendTo[s, p]]; k++; p = NextPrime[p]]; s]; seq[50] (* Amiram Eldar, Jul 18 2023 *)
Prime[#]&/@Select[Range[500], DigitCount[#, 2, 1]>DigitCount[Prime[#], 2, 1]&] (* Harvey P. Dale, Apr 19 2024 *)
PROG
(PARI) isok(k) = hammingweight(prime(k)) < hammingweight(k);
lista(nn) = for(n=1, nn, if (isok(n), print1(prime(n), ", "))); \\ Michel Marcus, Feb 05 2016
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Dec 01 2003
STATUS
approved