The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A025049 Number of down/up (initially descending) compositions of n. 55
 1, 1, 1, 2, 2, 4, 6, 9, 14, 23, 35, 55, 87, 136, 214, 337, 528, 830, 1306, 2051, 3223, 5067, 7962, 12512, 19667, 30908, 48574, 76343, 119982, 188565, 296358, 465764, 732006, 1150447, 1808078, 2841627, 4465992, 7018891, 11031101, 17336823, 27247087, 42822355 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS Original name was: Descending wiggly sums: number of sums adding to n in which terms alternately decrease and increase. 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 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..1000 Wikipedia, Alternating permutation FORMULA a(n) = 1 + A025047(n) - A025048(n) = Sum_{k=1..n} A059883(n,k). - Henry Bottomley, Feb 05 2001 EXAMPLE From Gus Wiseman, Jan 28 2022: (Start) The a(1) = 1 through a(8) = 14 down/up compositions:   (1)  (2)  (3)    (4)    (5)      (6)        (7)        (8)             (2,1)  (3,1)  (3,2)    (4,2)      (4,3)      (5,3)                           (4,1)    (5,1)      (5,2)      (6,2)                           (2,1,2)  (2,1,3)    (6,1)      (7,1)                                    (3,1,2)    (2,1,4)    (2,1,5)                                    (2,1,2,1)  (3,1,3)    (3,1,4)                                               (4,1,2)    (3,2,3)                                               (2,1,3,1)  (4,1,3)                                               (3,1,2,1)  (5,1,2)                                                          (2,1,3,2)                                                          (2,1,4,1)                                                          (3,1,3,1)                                                          (4,1,2,1)                                                          (2,1,2,1,2) (End) MATHEMATICA doupQ[y_]:=And@@Table[If[EvenQ[m], y[[m]]y[[m+1]]], {m, 1, Length[y]-1}]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], doupQ]], {n, 0, 15}] (* Gus Wiseman, Jan 28 2022 *) CROSSREFS The case of permutations is A000111. The undirected version is A025047, ranked by A345167. The up/down version is A025048, ranked by A350355. The strict case is A129838, undirected A349054. The weak version is A129853, up/down A129852. The version for patterns is A350354. These compositions are ranked by A350356. A001250 counts alternating permutations, complement A348615. A003242 counts Carlitz compositions, complement A261983. A011782 counts compositions, unordered A000041. A325534 counts separable partitions, complement A325535. A345192 counts non-alternating compositions, ranked by A345168. A345194 counts alternating patterns, complement A350252. A349052 counts weakly alternating compositions, complement A349053. Cf. A008965, A049774, A128761, A344604, A344605, A344614, A344615, A345195, A349057, A349800. Sequence in context: A058518 A018139 A293640 * A293552 A293546 A052012 Adjacent sequences:  A025046 A025047 A025048 * A025050 A025051 A025052 KEYWORD nonn AUTHOR EXTENSIONS a(0)=1 prepended by Alois P. Heinz, Jan 20 2022 Name changed by Gus Wiseman, Jan 28 2022 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 26 18:11 EDT 2022. Contains 357002 sequences. (Running on oeis4.)