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 A143071 #15 Sep 26 2020 14:53:05 %S A143071 1,2,3,4,5,6,8,9,10,12,15,16,17,18,20,23,24,27,29,30,32,33,34,36,39, %T A143071 40,43,45,46,48,51,53,54,57,58,60,64,65,66,68,71,72,75,77,78,80,83,85, %U A143071 86,89,90,92,96,99,101,102,105,106,108,113,114,116,120,128,129,130,132,135 %N A143071 A positive integer n is included if the number of 1's in the binary representation of n is a power of 2 (including being possibly 1). %H A143071 Reinhard Zumkeller, <a href="/A143071/b143071.txt">Table of n, a(n) for n = 1..10000</a> %F A143071 A209229(A000120(a(n))) = 1. - _Reinhard Zumkeller_, Sep 14 2014 %e A143071 34 in binary is 100010. This has 2 ones. And since 2 is a power of 2, 34 is included in the sequence. %p A143071 a:=proc(n) local nn, n1: nn:=convert(n,base,2): n1:=add(nn[j],j=1..nops(nn)): if 0 < n1 and type(log[2](n1),integer)=true then n else end if end proc: seq(a(n),n=1..140); # _Emeric Deutsch_, Aug 13 2008 %t A143071 Select[Range[150],IntegerQ[Log2[DigitCount[#,2,1]]]&] (* _Harvey P. Dale_, Sep 26 2020 *) %o A143071 (Haskell) %o A143071 a143071 n = a143071_list !! (n-1) %o A143071 a143071_list = filter ((== 1) . a209229 . a000120) [1..] %o A143071 -- _Reinhard Zumkeller_, Sep 14 2014 %Y A143071 Cf. A000120, A143070, A143072, A209229. %Y A143071 For complement see A271499. %K A143071 base,nonn %O A143071 1,2 %A A143071 _Leroy Quet_, Jul 22 2008 %E A143071 More terms from _Emeric Deutsch_, Aug 13 2008