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 A332834 #15 Feb 16 2025 08:33:59 %S A332834 0,0,0,0,1,4,14,36,88,199,432,914,1900,3896,7926,16036,32311,64944, %T A332834 130308,261166,523040,1046996,2095152,4191796,8385466,16773303, %U A332834 33549564,67102848,134210298,268426328,536859712,1073728142,2147466956,4294947014,8589909976 %N A332834 Number of compositions of n that are neither weakly increasing nor weakly decreasing. %C A332834 A composition of n is a finite sequence of positive integers summing to n. %H A332834 Andrew Howroyd, <a href="/A332834/b332834.txt">Table of n, a(n) for n = 0..1000</a> %H A332834 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UnimodalSequence.html">Unimodal Sequence</a>. %F A332834 a(n) = 2^(n - 1) - 2 * A000041(n) + A000005(n). %e A332834 The a(4) = 1 through a(6) = 14 compositions: %e A332834 (121) (131) (132) %e A332834 (212) (141) %e A332834 (1121) (213) %e A332834 (1211) (231) %e A332834 (312) %e A332834 (1131) %e A332834 (1212) %e A332834 (1221) %e A332834 (1311) %e A332834 (2112) %e A332834 (2121) %e A332834 (11121) %e A332834 (11211) %e A332834 (12111) %t A332834 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!Or[LessEqual@@#,GreaterEqual@@#]&]],{n,0,10}] %o A332834 (PARI) a(n)={if(n==0, 0, 2^(n-1) - 2*numbpart(n) + numdiv(n))} \\ _Andrew Howroyd_, Dec 30 2020 %Y A332834 The version for unsorted prime signature is A332831. %Y A332834 The version for run-lengths of compositions is A332833. %Y A332834 The complement appears to be counted by A329398. %Y A332834 Unimodal compositions are A001523. %Y A332834 Compositions that are not unimodal are A115981. %Y A332834 Partitions with weakly increasing or decreasing run-lengths are A332745. %Y A332834 Compositions with weakly increasing or decreasing run-lengths are A332835. %Y A332834 Compositions with weakly increasing run-lengths are A332836. %Y A332834 Compositions that are neither unimodal nor is their negation are A332870. %Y A332834 Cf. A007052, A072704, A107429, A328509, A329744, A332281, A332284, A332578, A332640, A332641, A332643, A332669, A332746. %K A332834 nonn %O A332834 0,6 %A A332834 _Gus Wiseman_, Feb 29 2020