%I #19 Nov 12 2018 15:52:09
%S 1,2,4,4,6,6,9,8,10,10,12,12,15,15,16,16,18,18,21,20,21,24,24,24,27,
%T 27,28,30,32,32,35,32,34,34,36,36,39,39,40,40,42,42,44,45,48,48,50,48,
%U 51,51,52,54,56,56,55,57,60,60,60,60,65,65,66,64,66,66,69,68,69,72,72,72
%N a(n) is the smallest multiple of {the number of 1's in the binary representation of n} that is >= n.
%H G. C. Greubel, <a href="/A161765/b161765.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A000120(n)*ceiling(n/A000120(n)). - _Michel Marcus_, Nov 11 2018
%e 11 (decimal) in binary is 1011. There are three 1's. Because 12 is the smallest multiple of 3 that is >= 11, then a(11) = 12.
%p a := proc (n) local n2, s, j: n2 := convert(n, base, 2): s := add(n2[i], i = 1 .. nops(n2)): for j while j*s < n do end do: j*s end proc: seq(a(n), n = 1 .. 80); # _Emeric Deutsch_, Jun 24 2009
%t Table[d=DigitCount[n,2,1];d*Ceiling[n/d],{n,80}] (* _Harvey P. Dale_, Aug 23 2013 *)
%o (PARI) a(n) = my(nb = hammingweight(n)); nb*ceil(n/nb); \\ _Michel Marcus_, Nov 11 2018
%Y Cf. A161764, A000120.
%K base,nonn
%O 1,2
%A _Leroy Quet_, Jun 18 2009
%E Extended by _Emeric Deutsch_, Jun 24 2009