login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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
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]], 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.
Sequence in context: A058518 A018139 A293640 * A293552 A293546 A366910
KEYWORD
nonn
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Jan 20 2022
Name changed by Gus Wiseman, Jan 28 2022
STATUS
approved