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 A143070 #18 Oct 26 2017 14:39:35 %S A143070 2,4,5,6,9,10,11,12,13,14,16,19,21,22,23,25,26,27,28,29,30,33,34,36, %T A143070 39,40,43,45,46,47,48,51,53,54,55,57,58,59,60,61,62,67,69,70,73,74,76, %U A143070 79,81,82,84,87,88,91,93,94,95,97,98,100,103,104,107,109,110,111,112,115 %N A143070 A positive integer n is included if the number of 0's in the binary representation of n is a power of 2 (including being possibly 1). %H A143070 Reinhard Zumkeller, <a href="/A143070/b143070.txt">Table of n, a(n) for n = 1..10000</a> %F A143070 A209229(A023416(a(n))) = 1. - _Reinhard Zumkeller_, Sep 14 2014 %e A143070 34 in binary is 100010. This has 4 zeros. And since 4 is a power of 2, 34 is included in the sequence. %p A143070 a:=proc(n) local nn,n0: nn:=convert(n,base,2): n0:=nops(nn)-add(nn[j], j=1.. nops(nn)): if 0 < n0 and type(log[2](n0),integer)=true then n else end if end proc: seq(a(n),n=1..100); # _Emeric Deutsch_, Aug 11 2008 %t A143070 Select[Range@ 120, IntegerQ@ Log2@ DigitCount[#, 2, 0] &] (* _Michael De Vlieger_, Oct 25 2017 *) %o A143070 (Haskell) %o A143070 a143070 n = a143070_list !! (n-1) %o A143070 a143070_list = filter ((== 1) . a209229 . a023416) [1..] %o A143070 -- _Reinhard Zumkeller_, Sep 14 2014 %o A143070 (PARI) ispow2(n) = (n==1) || (n==2) || (ispower(n,,&k) && (k==2)); %o A143070 isok(n) = ispow2(#binary(n) - hammingweight(n)); \\ _Michel Marcus_, Oct 26 2017 %Y A143070 Cf. A023416, A143071, A143072. %Y A143070 Cf. A209229. %K A143070 base,nonn %O A143070 1,1 %A A143070 _Leroy Quet_, Jul 22 2008 %E A143070 More terms from _Emeric Deutsch_, Aug 11 2008 %E A143070 a(61)-a(68) from _Ray Chandler_, Jun 20 2009