CINXE.COM
A143070 - OEIS
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <link rel="stylesheet" href="/styles.css"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name=viewport content="width=device-width, initial-scale=1"> <meta name="keywords" content="OEIS,integer sequences,Sloane" /> <title>A143070 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A143070" function redir() { var host = document.location.hostname; if(host != "oeis.org" && host != "127.0.0.1" && !/^([0-9.]+)$/.test(host) && host != "localhost" && host != "localhost.localdomain") { document.location = "https"+":"+"//"+"oeis"+".org/" + myURL; } } function sf() { if(document.location.pathname == "/" && document.f) document.f.q.focus(); } </script> </head> <body bgcolor=#ffffff onload="redir();sf()"> <div class=loginbar> <div class=login> <a href="/login?redirect=%2fA143070">login</a> </div> </div> <div class=center><div class=top> <center> <div class=donors> The OEIS is supported by <a href="http://oeisf.org/#DONATE">the many generous donors to the OEIS Foundation</a>. </div> <div class=banner> <a href="/"><img class=banner border="0" width="600" src="/banner2021.jpg" alt="A143070 - OEIS"></a> </div> </center> </div></div> <div class=center><div class=pagebody> <div class=searchbarcenter> <form name=f action="/search" method="GET"> <div class=searchbargreet> <div class=searchbar> <div class=searchq> <input class=searchbox maxLength=1024 name=q value="" title="Search Query"> </div> <div class=searchsubmit> <input type=submit value="Search" name=go> </div> <div class=hints> <span class=hints><a href="/hints.html">Hints</a></span> </div> </div> <div class=searchgreet> (Greetings from <a href="/welcome">The On-Line Encyclopedia of Integer Sequences</a>!) </div> </div> </form> </div> <div class=sequence> <div class=space1></div> <div class=line></div> <div class=seqhead> <div class=seqnumname> <div class=seqnum> A143070 </div> <div class=seqname> 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). </div> </div> <div class=scorerefs> 3 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>2, 4, 5, 6, 9, 10, 11, 12, 13, 14, 16, 19, 21, 22, 23, 25, 26, 27, 28, 29, 30, 33, 34, 36, 39, 40, 43, 45, 46, 47, 48, 51, 53, 54, 55, 57, 58, 59, 60, 61, 62, 67, 69, 70, 73, 74, 76, 79, 81, 82, 84, 87, 88, 91, 93, 94, 95, 97, 98, 100, 103, 104, 107, 109, 110, 111, 112, 115</div> <div class=seqdatalinks> (<a href="/A143070/list">list</a>; <a href="/A143070/graph">graph</a>; <a href="/search?q=A143070+-id:A143070">refs</a>; <a href="/A143070/listen">listen</a>; <a href="/history?seq=A143070">history</a>; <a href="/search?q=id:A143070&fmt=text">text</a>; <a href="/A143070/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>1,1</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>Reinhard Zumkeller, <a href="/A143070/b143070.txt">Table of n, a(n) for n = 1..10000</a></div> </div> </div> <div class=section> <div class=sectname>FORMULA</div> <div class=sectbody> <div class=sectline><a href="/A209229" title="Characteristic function of powers of 2, cf. A000079.">A209229</a>(<a href="/A023416" title="Number of 0's in binary expansion of n.">A023416</a>(a(n))) = 1. - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Sep 14 2014</div> </div> </div> <div class=section> <div class=sectname>EXAMPLE</div> <div class=sectbody> <div class=sectline>34 in binary is 100010. This has 4 zeros. And since 4 is a power of 2, 34 is included in the sequence.</div> </div> </div> <div class=section> <div class=sectname>MAPLE</div> <div class=sectbody> <div class=sectline>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); # <a href="/wiki/User:Emeric_Deutsch">Emeric Deutsch</a>, Aug 11 2008</div> </div> </div> <div class=section> <div class=sectname>MATHEMATICA</div> <div class=sectbody> <div class=sectline>Select[Range@ 120, IntegerQ@ Log2@ DigitCount[#, 2, 0] &] (* <a href="/wiki/User:Michael_De_Vlieger">Michael De Vlieger</a>, Oct 25 2017 *)</div> </div> </div> <div class=section> <div class=sectname>PROG</div> <div class=sectbody> <div class=sectline>(Haskell)</div> <div class=sectline>a143070 n = a143070_list !! (n-1)</div> <div class=sectline>a143070_list = filter ((== 1) . a209229 . a023416) [1..]</div> <div class=sectline>-- <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Sep 14 2014</div> <div class=sectline>(PARI) ispow2(n) = (n==1) || (n==2) || (ispower(n, , &k) && (k==2));</div> <div class=sectline>isok(n) = ispow2(#binary(n) - hammingweight(n)); \\ <a href="/wiki/User:Michel_Marcus">Michel Marcus</a>, Oct 26 2017</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline>Cf. <a href="/A023416" title="Number of 0's in binary expansion of n.">A023416</a>, <a href="/A143071" title="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 pos...">A143071</a>, <a href="/A143072" title="A positive integer n is included if both the number of 0's and the number of 1's in the binary representation of n are power...">A143072</a>.</div> <div class=sectline>Cf. <a href="/A209229" title="Characteristic function of powers of 2, cf. A000079.">A209229</a>.</div> <div class=sectline>Sequence in context: <a href="/A072726" title="Numerator of the rationals >= 1 whose continued fractions consist of only even terms, in ascending order by the sum of the c...">A072726</a> <a href="/A343585" title="a(n) = A081411(n) mod prime(n+1).">A343585</a> <a href="/A153242" title="Positions of general trees in A014486 whose degree is not one.">A153242</a> * <a href="/A340698" title="a(n) is the position of n^2 in the list of perfect powers.">A340698</a> <a href="/A206926" title="Numbers such that the number of contiguous palindromic bit patterns in their binary representation is minimal (for a given n...">A206926</a> <a href="/A005528" title="St酶rmer numbers or arc-cotangent irreducible numbers: numbers k such that the largest prime factor of k^2 + 1 is >= 2*k.">A005528</a></div> <div class=sectline>Adjacent sequences: <a href="/A143067" title="Expansion of psi(-x^3) / f(-x^4) in powers of x where psi(), f() are Ramanujan theta functions.">A143067</a> <a href="/A143068" title="Expansion of phi(q) / phi(-q^6) in powers of q where phi() is a Ramanujan theta function">A143068</a> <a href="/A143069" title="Least number k such that n*k has the fewest possible ones in its binary expansion.">A143069</a> * <a href="/A143071" title="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 pos...">A143071</a> <a href="/A143072" title="A positive integer n is included if both the number of 0's and the number of 1's in the binary representation of n are power...">A143072</a> <a href="/A143073" title="Least number k such that the binary expansion of n*k has fewer ones than n, or 0 if no such k exists.">A143073</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><span title="dependent on base used for sequence">base</span>,<span title="a sequence of nonnegative numbers">nonn</span></div> </div> </div> <div class=section> <div class=sectname>AUTHOR</div> <div class=sectbody> <div class=sectline><a href="/wiki/User:Leroy_Quet">Leroy Quet</a>, Jul 22 2008</div> </div> </div> <div class=section> <div class=sectname>EXTENSIONS</div> <div class=sectbody> <div class=sectline>More terms from <a href="/wiki/User:Emeric_Deutsch">Emeric Deutsch</a>, Aug 11 2008</div> <div class=sectline>a(61)-a(68) from <a href="/wiki/User:Ray_Chandler">Ray Chandler</a>, Jun 20 2009</div> </div> </div> <div class=section> <div class=sectname>STATUS</div> <div class=sectbody> <div class=sectline>approved</div> </div> </div> </div> <div class=space10></div> </div> </div></div> <p> <div class=footerpad></div> <div class=footer> <center> <div class=bottom> <div class=linksbar> <a href="/">Lookup</a> <a href="/wiki/Welcome"><font color="red">Welcome</font></a> <a href="/wiki/Main_Page"><font color="red">Wiki</font></a> <a href="/wiki/Special:RequestAccount">Register</a> <a href="/play.html">Music</a> <a href="/plot2.html">Plot 2</a> <a href="/demo1.html">Demos</a> <a href="/wiki/Index_to_OEIS">Index</a> <a href="/webcam">WebCam</a> <a href="/Submit.html">Contribute</a> <a href="/eishelp2.html">Format</a> <a href="/wiki/Style_Sheet">Style Sheet</a> <a href="/transforms.html">Transforms</a> <a href="/ol.html">Superseeker</a> <a href="/recent">Recents</a> </div> <div class=linksbar> <a href="/community.html">The OEIS Community</a> </div> <div class=linksbar> Maintained by <a href="http://oeisf.org">The OEIS Foundation Inc.</a> </div> <div class=dbinfo>Last modified February 17 19:56 EST 2025. Contains 380975 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>