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 A350252 #10 Feb 04 2022 18:10:52 %S A350252 0,0,1,7,53,439,4121,43675,519249,6867463,100228877,1602238783, %T A350252 27866817297,524175098299,10606844137009,229807953097903, %U A350252 5308671596791901,130261745042452855,3383732450013895721,92770140175473602755,2677110186541556215233 %N A350252 Number of non-alternating patterns of length n. %C A350252 We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. %C A350252 A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). An alternating pattern is necessarily an anti-run (A005649). %C A350252 Conjecture: Also the number of non-weakly up/down (or down/up) patterns of length n. For example: %C A350252 - The a(3) = 7 non-weakly up/down patterns: %C A350252 (121), (122), (123), (132), (221), (231), (321) %C A350252 - The a(3) = 7 non-weakly down/up patterns: %C A350252 (112), (123), (211), (212), (213), (312), (321) %C A350252 - The a(3) = 7 non-alternating patterns (see example for more): %C A350252 (111), (112), (122), (123), (211), (221), (321) %H A350252 Andrew Howroyd, <a href="/A350252/b350252.txt">Table of n, a(n) for n = 0..200</a> %F A350252 a(n) = A000670(n) - A345194(n). %e A350252 The a(2) = 1 and a(3) = 7 non-alternating patterns: %e A350252 (1,1) (1,1,1) %e A350252 (1,1,2) %e A350252 (1,2,2) %e A350252 (1,2,3) %e A350252 (2,1,1) %e A350252 (2,2,1) %e A350252 (3,2,1) %e A350252 The a(4) = 53 non-alternating patterns: %e A350252 2112 3124 4123 1112 2134 1234 3112 2113 1123 %e A350252 2211 3214 4213 1211 2314 1243 3123 2123 1213 %e A350252 2212 3412 4312 1212 2341 1324 3211 2213 1223 %e A350252 3421 4321 1221 2413 1342 3212 2311 1231 %e A350252 1222 2431 1423 3213 2312 1232 %e A350252 1432 3312 2313 1233 %e A350252 3321 2321 1312 %e A350252 2331 1321 %e A350252 1322 %e A350252 1323 %e A350252 1332 %t A350252 allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]]; %t A350252 wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&& Length[Split[Sign[Differences[y]]]]==Length[y]-1]; %t A350252 Table[Length[Select[Join@@Permutations/@allnorm[n],!wigQ[#]&]],{n,0,6}] %Y A350252 The unordered version is A122746. %Y A350252 The version for compositions is A345192, ranked by A345168, weak A349053. %Y A350252 The complement is counted by A345194, weak A349058. %Y A350252 The version for factorizations is A348613, complement A348610, weak A350139. %Y A350252 The strict case (permutations) is A348615, complement A001250. %Y A350252 The weak version for partitions is A349061, complement A349060. %Y A350252 The weak version for perms of prime indices is A349797, complement A349056. %Y A350252 The weak version is A350138. %Y A350252 The version for perms of prime indices is A350251, complement A345164. %Y A350252 A000670 = patterns (ranked by A333217). %Y A350252 A003242 = anti-run compositions, complement A261983, ranked by A333489. %Y A350252 A005649 = anti-run patterns, complement A069321. %Y A350252 A019536 = necklace patterns. %Y A350252 A025047/A129852/A129853 = alternating compositions, ranked by A345167. %Y A350252 A226316 = patterns avoiding (1,2,3), weakly A052709, complement A335515. %Y A350252 A345163 = normal partitions w/ alternating permutation, complement A345162. %Y A350252 A345170 = partitions w/ alternating permutation, complement A345165. %Y A350252 A349055 = normal multisets w/ alternating permutation, complement A349050. %Y A350252 Cf. A049774, A052955, A096441, A128761, A274230, A335456, A335457, A336103, A344605, A344614. %K A350252 nonn %O A350252 0,4 %A A350252 _Gus Wiseman_, Jan 13 2022 %E A350252 Terms a(9) and beyond from _Andrew Howroyd_, Feb 04 2022