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 A115981 #23 Feb 16 2025 08:33:00 %S A115981 0,0,0,0,0,1,5,17,49,126,303,694,1536,3312,7009,14619,30164,61732, %T A115981 125568,254246,513048,1032696,2074875,4163256,8345605,16717996, %U A115981 33473334,66998380,134067959,268233386,536599508,1073378850,2147000209 %N A115981 The number of compositions of n which cannot be viewed as stacks. %C A115981 A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. A composition of n is a finite sequence of positive integers summing to n. - _Gus Wiseman_, Mar 05 2020 %H A115981 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UnimodalSequence.html">Unimodal Sequence</a> %F A115981 a(n) = A011782(n) - A001523(n). %e A115981 a(5) = 1 counting {212}. %e A115981 a(6) = 5 counting {1212, 2112,2121,213,312}. %e A115981 a(7) = 17 counting {11212, 12112,12121, 21211, 21121, 21112, 2122, 2212, 2113, 3112, 2131, 3121, 1213, 1312, 412, 214, 313}. %e A115981 a(8) = 49 = 128 - 79. %e A115981 a(9) = 126 = 256 - 130. %t A115981 unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]]; %t A115981 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!unimodQ[#]&]],{n,0,10}] (* _Gus Wiseman_, Mar 05 2020 *) %Y A115981 Cf. A011782, A115982. %Y A115981 The complement is counted by A001523. %Y A115981 The strict case is A072707. %Y A115981 The case covering an initial interval is A332743. %Y A115981 The version whose negation is not unimodal either is A332870. %Y A115981 Non-unimodal permutations are A059204. %Y A115981 Non-unimodal normal sequences are A328509. %Y A115981 Partitions with non-unimodal run-lengths are A332281. %Y A115981 Numbers whose prime signature is not unimodal are A332282. %Y A115981 Partitions whose 0-appended first differences are not unimodal are A332284. %Y A115981 Non-unimodal permutations of the prime indices of n are A332671. %Y A115981 Cf. A007052, A072704, A227038, A329398, A332280, A332283, A332672, A332578, A332669, A332834. %K A115981 easy,nonn %O A115981 0,7 %A A115981 _Alford Arnold_, Feb 12 2006 %E A115981 More terms from Brian Kuehn (brk158(AT)psu.edu), Apr 20 2006 %E A115981 a(25) corrected by _Georg Fischer_, Jun 29 2021