CINXE.COM
A332835 - 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>A332835 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A332835" 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=%2fA332835">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="A332835 - 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> A332835 </div> <div class=seqname> Number of compositions of n whose run-lengths are either weakly increasing or weakly decreasing. </div> </div> <div class=scorerefs> 21 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>1, 1, 2, 4, 8, 16, 29, 56, 101, 181, 327, 583, 1023, 1820, 3207, 5631, 9905, 17394, 30489, 53481, 93725, 164169, 287606, 503672, 881834, 1544018, 2703161, 4731860, 8283291, 14499392, 25379278, 44422866, 77754798, 136093756, 238204369, 416923752, 729728031</div> <div class=seqdatalinks> (<a href="/A332835/list">list</a>; <a href="/A332835/graph">graph</a>; <a href="/search?q=A332835+-id:A332835">refs</a>; <a href="/A332835/listen">listen</a>; <a href="/history?seq=A332835">history</a>; <a href="/search?q=id:A332835&fmt=text">text</a>; <a href="/A332835/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>0,3</div> </div> </div> <div class=section> <div class=sectname>COMMENTS</div> <div class=sectbody> <div class=sectline>A composition of n is a finite sequence of positive integers summing to n.</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>Andrew Howroyd, <a href="/A332835/b332835.txt">Table of n, a(n) for n = 0..1000</a></div> <div class=sectline>Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/UnimodalSequence.html">Unimodal Sequence</a></div> </div> </div> <div class=section> <div class=sectname>FORMULA</div> <div class=sectbody> <div class=sectline>a(n) = 2 * <a href="/A332836" title="Number of compositions of n whose run-lengths are weakly increasing.">A332836</a>(n) - <a href="/A329738" title="Number of compositions of n whose run-lengths are all equal.">A329738</a>(n).</div> </div> </div> <div class=section> <div class=sectname>EXAMPLE</div> <div class=sectbody> <div class=sectline>The a(6) = 29 compositions:</div> <div class=sectline> (6) (141) (213) (1113) (21111)</div> <div class=sectline> (51) (114) (132) (222) (12111)</div> <div class=sectline> (15) (33) (123) (2211) (11121)</div> <div class=sectline> (42) (321) (3111) (2121) (11112)</div> <div class=sectline> (24) (312) (1311) (1212) (111111)</div> <div class=sectline> (411) (231) (1131) (1122)</div> <div class=sectline>Missing are: (2112), (1221), (11211).</div> </div> </div> <div class=section> <div class=sectname>MATHEMATICA</div> <div class=sectbody> <div class=sectline>Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Or[LessEqual@@Length/@Split[#], GreaterEqual@@Length/@Split[#]]&]], {n, 0, 20}]</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline>The version for the compositions themselves (not run-lengths) is <a href="/A329398" title="Number of compositions of n with uniform Lyndon factorization and uniform co-Lyndon factorization.">A329398</a>.</div> <div class=sectline>Compositions with equal run-lengths are <a href="/A329738" title="Number of compositions of n whose run-lengths are all equal.">A329738</a>.</div> <div class=sectline>The case of partitions is <a href="/A332745" title="Number of integer partitions of n whose run-lengths are either weakly increasing or weakly decreasing.">A332745</a>.</div> <div class=sectline>The version for unsorted prime signature is the complement of <a href="/A332831" title="Numbers whose unsorted prime signature is neither weakly increasing nor weakly decreasing.">A332831</a>.</div> <div class=sectline>The complement is counted by <a href="/A332833" title="Number of compositions of n whose run-lengths are neither weakly increasing nor weakly decreasing.">A332833</a>.</div> <div class=sectline>Unimodal compositions are <a href="/A001523" title="Number of stacks, or planar partitions of n; also weakly unimodal compositions of n.">A001523</a>.</div> <div class=sectline>Partitions with weakly decreasing run-lengths are <a href="/A100882" title="Number of partitions of n in which the sequence of frequencies of the summands is nonincreasing.">A100882</a>.</div> <div class=sectline>Partitions with weakly increasing run-lengths are <a href="/A100883" title="Number of partitions of n in which the sequence of frequencies of the summands is nondecreasing.">A100883</a>.</div> <div class=sectline>Compositions that are not unimodal are <a href="/A115981" title="The number of compositions of n which cannot be viewed as stacks.">A115981</a>.</div> <div class=sectline>Compositions whose negation is unimodal are <a href="/A332578" title="Number of compositions of n whose negation is unimodal.">A332578</a>.</div> <div class=sectline>Compositions whose run-lengths are unimodal are <a href="/A332726" title="Number of compositions of n whose run-lengths are unimodal.">A332726</a>.</div> <div class=sectline>Neither weakly increasing nor weakly decreasing compositions are <a href="/A332834" title="Number of compositions of n that are neither weakly increasing nor weakly decreasing.">A332834</a>.</div> <div class=sectline>Compositions with weakly increasing run-lengths are <a href="/A332836" title="Number of compositions of n whose run-lengths are weakly increasing.">A332836</a>.</div> <div class=sectline>Compositions that are neither unimodal nor is their negation are <a href="/A332870" title="Number of compositions of n that are neither unimodal nor is their negation.">A332870</a>.</div> <div class=sectline>Cf. <a href="/A001462" title="Golomb's sequence: a(n) is the number of times n occurs, starting with a(1) = 1.">A001462</a>, <a href="/A181819" title="Prime shadow of n: a(1) = 1; for n>1, if n = Product prime(i)^e(i), then a(n) = Product prime(e(i)).">A181819</a>, <a href="/A329744" title="Triangle read by rows where T(n,k) is the number of compositions of n > 0 with runs-resistance k, 0 <= k <= n - 1.">A329744</a>, <a href="/A329766" title="Number of compositions of n whose run-lengths cover an initial interval of positive integers.">A329766</a>, <a href="/A332273" title="Sizes of maximal weakly decreasing subsequences of A000002.">A332273</a>, <a href="/A332640" title="Number of integer partitions of n such that neither the run-lengths nor the negated run-lengths are unimodal.">A332640</a>, <a href="/A332641" title="Number of integer partitions of n whose run-lengths are neither weakly increasing nor weakly decreasing.">A332641</a>, <a href="/A332746" title="Number of integer partitions of n such that either the run-lengths or the negated run-lengths are unimodal.">A332746</a>.</div> <div class=sectline>Sequence in context: <a href="/A160786" title="The number of odd partitions of consecutive odd integers.">A160786</a> <a href="/A054154" title="Moebius transform of A001037 (starting at term 0).">A054154</a> <a href="/A292793" title="1/4 of the number of self-avoiding paths that are made of alternated vertical and horizontal n consecutive steps. (start poi...">A292793</a> * <a href="/A018469" title="Divisors of 464.">A018469</a> <a href="/A098904" title="Even numbers whose number of distinct prime factors is odd.">A098904</a> <a href="/A248846" title="Triangle read by rows: T(m,n) = number of ways of distributing n distinguishable balls into m distinguishable bins of size 4...">A248846</a></div> <div class=sectline>Adjacent sequences: <a href="/A332832" title="Heinz numbers of integer partitions whose negated first differences (assuming the last part is zero) are not unimodal.">A332832</a> <a href="/A332833" title="Number of compositions of n whose run-lengths are neither weakly increasing nor weakly decreasing.">A332833</a> <a href="/A332834" title="Number of compositions of n that are neither weakly increasing nor weakly decreasing.">A332834</a> * <a href="/A332836" title="Number of compositions of n whose run-lengths are weakly increasing.">A332836</a> <a href="/A332837" title="Squares visited by a knight moving on a double spiral numbered board and moving to the lowest available unvisited square at ...">A332837</a> <a href="/A332838" title="Numbers k such that -tau(k)^2 == tau(k) mod k where tau = A000005.">A332838</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><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:Gus_Wiseman">Gus Wiseman</a>, Feb 29 2020</div> </div> </div> <div class=section> <div class=sectname>EXTENSIONS</div> <div class=sectbody> <div class=sectline>Terms a(21) and beyond from <a href="/wiki/User:Andrew_Howroyd">Andrew Howroyd</a>, Dec 30 2020</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 November 24 18:15 EST 2024. Contains 378083 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>