login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A349053 Number of non-weakly alternating integer compositions of n. 29
0, 0, 0, 0, 0, 0, 4, 12, 37, 95, 232, 533, 1198, 2613, 5619, 11915, 25011, 52064, 107694, 221558, 453850, 926309, 1884942, 3825968, 7749312, 15667596, 31628516, 63766109, 128415848, 258365323, 519392582, 1043405306, 2094829709, 4203577778, 8431313237, 16904555958 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
COMMENTS
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. Then a sequence is (strongly) alternating iff it is a weakly alternating anti-run.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000 (terms 0..55 from Martin Ehrenstein)
FORMULA
a(n) = A011782(n) - A349052(n).
EXAMPLE
The a(6) = 12 compositions:
(1,1,2,2,1) (1,1,2,3) (1,2,4)
(1,2,1,1,2) (1,2,3,1) (4,2,1)
(1,2,2,1,1) (1,3,2,1)
(2,1,1,2,1) (2,1,1,3)
(3,1,1,2)
(3,2,1,1)
MATHEMATICA
wwkQ[y_]:=And@@Table[If[EvenQ[m], y[[m]]<=y[[m+1]], y[[m]]>=y[[m+1]]], {m, 1, Length[y]-1}]||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], !wwkQ[#]&]], {n, 0, 10}]
CROSSREFS
Complementary directed versions are A129852/A129853, strong A025048/A025049.
The strong version is A345192.
The complement is counted by A349052.
These compositions are ranked by A349057, strong A345168.
The complementary version for patterns is A349058, strong A345194.
The complementary multiplicative version is A349059, strong A348610.
An unordered version (partitions) is A349061, complement A349060.
The version for ordered prime factorizations is A349797, complement A349056.
The version for patterns is A350138, strong A350252.
The version for ordered factorizations is A350139.
A001250 counts alternating permutations, complement A348615.
A001700 counts compositions of 2n with alternating sum 0.
A003242 counts Carlitz (anti-run) compositions.
A011782 counts compositions, unordered A000041.
A025047 counts alternating compositions, ranked by A345167.
A106356 counts compositions by number of maximal anti-runs.
A344604 counts alternating compositions with twins.
A345164 counts alternating ordered prime factorizations.
A349054 counts strict alternating compositions.
Sequence in context: A076124 A247952 A183923 * A279277 A101555 A033130
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 16 2021
EXTENSIONS
a(21)-a(35) from Martin Ehrenstein, Jan 08 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)