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 A025049 #25 Apr 29 2025 14:31:48 %S A025049 1,1,1,2,2,4,6,9,14,23,35,55,87,136,214,337,528,830,1306,2051,3223, %T A025049 5067,7962,12512,19667,30908,48574,76343,119982,188565,296358,465764, %U A025049 732006,1150447,1808078,2841627,4465992,7018891,11031101,17336823,27247087,42822355 %N A025049 Number of down/up (initially descending) compositions of n. %C A025049 Original name was: Descending wiggly sums: number of sums adding to n in which terms alternately decrease and increase. %C A025049 A composition is down/up if it is alternately strictly decreasing and strictly increasing, starting with a decrease. For example, the partition (3,2,2,2,1) has no down/up permutations, even though it does have the anti-run permutation (2,1,2,3,2). - _Gus Wiseman_, Jan 28 2022 %H A025049 Alois P. Heinz, <a href="/A025049/b025049.txt">Table of n, a(n) for n = 0..1000</a> %H A025049 Mohammed L. Nadji, Moussa Ahmia, Daniel F. Checa, and José L. Ramírez, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL28/Ramirez/ramirez19.html">Arndt Compositions with Restricted Parts, Palindromes, and Colored Variants</a>, J. Int. Seq. (2025) Vol. 28, Issue 3, Article 25.3.6. See p. 12. %H A025049 Wikipedia, <a href="https://en.wikipedia.org/wiki/Alternating_permutation">Alternating permutation</a> %F A025049 a(n) = 1 + A025047(n) - A025048(n) = Sum_{k=1..n} A059883(n,k). - _Henry Bottomley_, Feb 05 2001 %e A025049 From _Gus Wiseman_, Jan 28 2022: (Start) %e A025049 The a(1) = 1 through a(8) = 14 down/up compositions: %e A025049 (1) (2) (3) (4) (5) (6) (7) (8) %e A025049 (2,1) (3,1) (3,2) (4,2) (4,3) (5,3) %e A025049 (4,1) (5,1) (5,2) (6,2) %e A025049 (2,1,2) (2,1,3) (6,1) (7,1) %e A025049 (3,1,2) (2,1,4) (2,1,5) %e A025049 (2,1,2,1) (3,1,3) (3,1,4) %e A025049 (4,1,2) (3,2,3) %e A025049 (2,1,3,1) (4,1,3) %e A025049 (3,1,2,1) (5,1,2) %e A025049 (2,1,3,2) %e A025049 (2,1,4,1) %e A025049 (3,1,3,1) %e A025049 (4,1,2,1) %e A025049 (2,1,2,1,2) %e A025049 (End) %t A025049 doupQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<y[[m+1]],y[[m]]>y[[m+1]]],{m,1,Length[y]-1}]; %t A025049 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],doupQ]],{n,0,15}] (* _Gus Wiseman_, Jan 28 2022 *) %Y A025049 The case of permutations is A000111. %Y A025049 The undirected version is A025047, ranked by A345167. %Y A025049 The up/down version is A025048, ranked by A350355. %Y A025049 The strict case is A129838, undirected A349054. %Y A025049 The weak version is A129853, up/down A129852. %Y A025049 The version for patterns is A350354. %Y A025049 These compositions are ranked by A350356. %Y A025049 A001250 counts alternating permutations, complement A348615. %Y A025049 A003242 counts Carlitz compositions, complement A261983. %Y A025049 A011782 counts compositions, unordered A000041. %Y A025049 A325534 counts separable partitions, complement A325535. %Y A025049 A345192 counts non-alternating compositions, ranked by A345168. %Y A025049 A345194 counts alternating patterns, complement A350252. %Y A025049 A349052 counts weakly alternating compositions, complement A349053. %Y A025049 Cf. A008965, A049774, A128761, A344604, A344605, A344614, A344615, A345195, A349057, A349800. %K A025049 nonn %O A025049 0,4 %A A025049 _David W. Wilson_ %E A025049 a(0)=1 prepended by _Alois P. Heinz_, Jan 20 2022 %E A025049 Name changed by _Gus Wiseman_, Jan 28 2022