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 A025048 #28 Apr 29 2025 14:33:32 %S A025048 1,1,1,2,3,4,7,11,16,26,41,64,100,158,247,389,612,960,1509,2372,3727, %T A025048 5858,9207,14468,22738,35737,56164,88268,138726,218024,342652,538524, %U A025048 846358,1330160,2090522,3285526,5163632,8115323,12754288,20045027,31503382 %N A025048 Number of up/down (initially ascending) compositions of n. %C A025048 Original name was: Ascending wiggly sums: number of sums adding to n in which terms alternately increase and decrease. %C A025048 A composition is up/down if it is alternately strictly increasing and strictly decreasing, starting with an increase. For example, the partition (3,2,2,2,1) has no up/down permutations, even though it does have the anti-run permutation (2,3,2,1,2). - _Gus Wiseman_, Jan 15 2022 %H A025048 Alois P. Heinz, <a href="/A025048/b025048.txt">Table of n, a(n) for n = 0..1000</a> %H A025048 Wikipedia, <a href="https://en.wikipedia.org/wiki/Alternating_permutation">Alternating permutation</a> %F A025048 a(n) = 1 + A025047(n) - A025049(n) = Sum_k A059882(n,k). - _Henry Bottomley_, Feb 05 2001 %F A025048 a(n) ~ c * d^n, where d = 1.571630806607064114100138865739690782401305155950789062725011227781640624..., c = 0.4408955566119650057730070154620695491718230084159159991449729825619... . - _Vaclav Kotesovec_, Sep 12 2014 %e A025048 From _Gus Wiseman_, Jan 15 2022: (Start) %e A025048 The a(1) = 1 through a(7) = 11 up/down compositions: %e A025048 (1) (2) (3) (4) (5) (6) (7) %e A025048 (1,2) (1,3) (1,4) (1,5) (1,6) %e A025048 (1,2,1) (2,3) (2,4) (2,5) %e A025048 (1,3,1) (1,3,2) (3,4) %e A025048 (1,4,1) (1,4,2) %e A025048 (2,3,1) (1,5,1) %e A025048 (1,2,1,2) (2,3,2) %e A025048 (2,4,1) %e A025048 (1,2,1,3) %e A025048 (1,3,1,2) %e A025048 (1,2,1,2,1) %e A025048 (End) %t A025048 updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]<y[[m+1]]],{m,1,Length[y]-1}]; %t A025048 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],updoQ]],{n,0,15}] (* _Gus Wiseman_, Jan 15 2022 *) %Y A025048 The case of permutations is A000111. %Y A025048 The undirected version is A025047, ranked by A345167. %Y A025048 The down/up version is A025049, ranked by A350356. %Y A025048 The strict case is A129838, undirected A349054. %Y A025048 The weak version is A129852, down/up A129853. %Y A025048 The version for patterns is A350354. %Y A025048 These compositions are ranked by A350355. %Y A025048 A001250 counts alternating permutations, complement A348615. %Y A025048 A003242 counts Carlitz compositions, complement A261983. %Y A025048 A011782 counts compositions, unordered A000041. %Y A025048 A325534 counts separable partitions, complement A325535. %Y A025048 A345192 counts non-alternating compositions, ranked by A345168. %Y A025048 A345194 counts alternating patterns, complement A350252. %Y A025048 A349052 counts weakly alternating compositions, complement A349053. %Y A025048 Cf. A008965, A049774, A128761, A344604, A344605, A344614, A344615, A345195, A349057, A349800. %K A025048 nonn %O A025048 0,4 %A A025048 _David W. Wilson_ %E A025048 Name and offset changed by _Gus Wiseman_, Jan 15 2022