This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A161764 #20 Feb 02 2018 02:39:45 %S A161764 1,2,2,4,4,6,6,8,8,10,9,12,12,12,12,16,16,18,18,20,21,21,20,24,24,24, %T A161764 24,27,28,28,30,32,32,34,33,36,36,36,36,40,39,42,40,42,44,44,45,48,48, %U A161764 48,48,51,52,52,55,54,56,56,55,60,60,60,60,64,64,66,66,68,69,69,68,72,72 %N A161764 a(n) is the largest multiple of {the number of 1's in the binary representation of n} that is <= n. %C A161764 a(n) = n - A199238(n). - _Reinhard Zumkeller_, Nov 04 2011 %H A161764 Reinhard Zumkeller, <a href="/A161764/b161764.txt">Table of n, a(n) for n = 1..10000</a> %e A161764 11 (decimal) in binary is 1011. There are three 1's. Because 9 is the largest multiple of 3 that is <= 11, then a(11) = 9. %p A161764 a := proc (n) local n2, n1, j: n2 := convert(n, base, 2): n1 := add(n2[i], i = 1 .. nops(n2)): for j while j*n1 <= n do j*n1 end do end proc: seq(a(n), n = 1 .. 80); # _Emeric Deutsch_, Jun 26 2009 %o A161764 (PARI) a(n)=local(B=binary(n),w=B*vector(#B,x,1)~);n-n%w \\ _Hagen von Eitzen_, Jun 22 2009 %o A161764 (Haskell) %o A161764 a161764 n = n - a199238 n -- _Reinhard Zumkeller_, Nov 04 2011 %Y A161764 Cf. A000120, A161765. %K A161764 base,nonn %O A161764 1,2 %A A161764 _Leroy Quet_, Jun 18 2009 %E A161764 Extended by _Hagen von Eitzen_ and _Emeric Deutsch_, Jun 26 2009