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 A349800 #16 Jan 31 2024 15:52:17 %S A349800 0,0,1,1,4,9,16,33,62,113,205,373,664,1190,2113,3744,6618,11683,20564, %T A349800 36164,63489,111343,195042,341357,596892,1042976,1821179,3178145, %U A349800 5543173,9663545,16839321,29332231,51075576,88908912,154722756,269186074,468221264 %N A349800 Number of integer compositions of n that are weakly alternating and have at least two adjacent equal parts. %C A349800 We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. %C A349800 This sequence counts compositions that are weakly but not strongly alternating; also weakly alternating non-anti-run compositions. %H A349800 Andrew Howroyd, <a href="/A349800/b349800.txt">Table of n, a(n) for n = 0..1000</a> %H A349800 Wikipedia, <a href="https://en.wikipedia.org/wiki/Alternating_permutation">Alternating permutation</a> %F A349800 a(n) = A349052(n) - A025047(n). - _Andrew Howroyd_, Jan 31 2024 %e A349800 The a(2) = 1 through a(6) = 16 compositions: %e A349800 (1,1) (1,1,1) (2,2) (1,1,3) (3,3) %e A349800 (1,1,2) (1,2,2) (1,1,4) %e A349800 (2,1,1) (2,2,1) (2,2,2) %e A349800 (1,1,1,1) (3,1,1) (4,1,1) %e A349800 (1,1,1,2) (1,1,1,3) %e A349800 (1,1,2,1) (1,1,2,2) %e A349800 (1,2,1,1) (1,1,3,1) %e A349800 (2,1,1,1) (1,3,1,1) %e A349800 (1,1,1,1,1) (2,2,1,1) %e A349800 (3,1,1,1) %e A349800 (1,1,1,1,2) %e A349800 (1,1,1,2,1) %e A349800 (1,1,2,1,1) %e A349800 (1,2,1,1,1) %e A349800 (2,1,1,1,1) %e A349800 (1,1,1,1,1,1) %t A349800 wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y] &&Length[Split[Sign[Differences[y]]]]==Length[y]-1]; %t A349800 whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}]; %t A349800 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],(whkQ[#]||whkQ[-#])&&!wigQ[#]&]],{n,0,10}] %Y A349800 This is the weakly alternating case of A345192, ranked by A345168. %Y A349800 The case of partitions is A349795, ranked by A350137. %Y A349800 The version counting permutations of prime indices is A349798. %Y A349800 These compositions are ranked by A349799. %Y A349800 A001250 = alternating permutations, ranked by A349051, complement A348615. %Y A349800 A003242 = Carlitz (anti-run) compositions, ranked by A333489. %Y A349800 A025047/A025048/A025049 = alternating compositions, ranked by A345167. %Y A349800 A261983 = non-anti-run compositions, ranked by A348612. %Y A349800 A345165 = partitions without an alternating permutation, ranked by A345171. %Y A349800 A345170 = partitions with an alternating permutation, ranked by A345172. %Y A349800 A345173 = non-alternating anti-run partitions, ranked by A345166. %Y A349800 A345195 = non-alternating anti-run compositions, ranked by A345169. %Y A349800 A348377 = non-alternating non-twin compositions. %Y A349800 A349801 = non-alternating partitions, ranked by A289553. %Y A349800 Weakly alternating: %Y A349800 - A349052 = compositions, directed A129852/A129853, complement A349053. %Y A349800 - A349056 = permutations of prime indices, complement A349797. %Y A349800 - A349057 = complement of standard composition numbers (too dense). %Y A349800 - A349058 = patterns, complement A350138. %Y A349800 - A349059 = ordered factorizations, complement A350139. %Y A349800 - A349060 = partitions, complement A349061. %Y A349800 Cf. A008965, A011782, A027383, A096441, A274230, A333213, A344614, A344615, A348382, A348613, A349796, A350140. %K A349800 nonn %O A349800 0,5 %A A349800 _Gus Wiseman_, Dec 16 2021 %E A349800 a(21) onwards from _Andrew Howroyd_, Jan 31 2024