A071594 Numbers k such that the number of 1's in the binary representation of k equals omega(k), the number of distinct primes in the factorization of k.
2, 4, 6, 8, 10, 12, 16, 18, 20, 24, 32, 33, 34, 36, 40, 42, 48, 64, 65, 68, 70, 72, 80, 84, 96, 128, 129, 136, 138, 140, 144, 160, 168, 192, 210, 256, 266, 272, 273, 276, 280, 288, 290, 320, 322, 330, 336, 384, 385, 390, 420, 512, 513, 514, 518, 522, 530, 532
Offset: 1
Examples
129 = 10000001 in base 2 and 129 = 3*43 hence 129 is in the sequence.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..2000 from Ivan Neretin)
Programs
-
Mathematica
Select[Range[2, 1000], Length[FactorInteger[#]] == DigitCount[#, 2, 1] &] (* Ivan Neretin, May 30 2015 *)
-
PARI
for(n=1,1000,if(sum(i=1,length(binary(n)), component(binary(n),i))==omega(n),print1(n,",")))
-
PARI
select(n->hammingweight(n)==omega(n), vector(1000, n, n)) \\ Michel Marcus, May 30 2015
Extensions
Name edited by Amiram Eldar, Jan 11 2020