[go: up one dir, main page]

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!)
A349800 Number of integer compositions of n that are weakly alternating and have at least two adjacent equal parts. 16
0, 0, 1, 1, 4, 9, 16, 33, 62, 113, 205, 373, 664, 1190, 2113, 3744, 6618, 11683, 20564, 36164, 63489, 111343, 195042, 341357, 596892, 1042976, 1821179, 3178145, 5543173, 9663545, 16839321, 29332231, 51075576, 88908912, 154722756, 269186074, 468221264 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either.
This sequence counts compositions that are weakly but not strongly alternating; also weakly alternating non-anti-run compositions.
LINKS
FORMULA
a(n) = A349052(n) - A025047(n). - Andrew Howroyd, Jan 31 2024
EXAMPLE
The a(2) = 1 through a(6) = 16 compositions:
(1,1) (1,1,1) (2,2) (1,1,3) (3,3)
(1,1,2) (1,2,2) (1,1,4)
(2,1,1) (2,2,1) (2,2,2)
(1,1,1,1) (3,1,1) (4,1,1)
(1,1,1,2) (1,1,1,3)
(1,1,2,1) (1,1,2,2)
(1,2,1,1) (1,1,3,1)
(2,1,1,1) (1,3,1,1)
(1,1,1,1,1) (2,2,1,1)
(3,1,1,1)
(1,1,1,1,2)
(1,1,1,2,1)
(1,1,2,1,1)
(1,2,1,1,1)
(2,1,1,1,1)
(1,1,1,1,1,1)
MATHEMATICA
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]==Length[y] &&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
whkQ[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], (whkQ[#]||whkQ[-#])&&!wigQ[#]&]], {n, 0, 10}]
CROSSREFS
This is the weakly alternating case of A345192, ranked by A345168.
The case of partitions is A349795, ranked by A350137.
The version counting permutations of prime indices is A349798.
These compositions are ranked by A349799.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A003242 = Carlitz (anti-run) compositions, ranked by A333489.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A261983 = non-anti-run compositions, ranked by A348612.
A345165 = partitions without an alternating permutation, ranked by A345171.
A345170 = partitions with an alternating permutation, ranked by A345172.
A345173 = non-alternating anti-run partitions, ranked by A345166.
A345195 = non-alternating anti-run compositions, ranked by A345169.
A348377 = non-alternating non-twin compositions.
A349801 = non-alternating partitions, ranked by A289553.
Weakly alternating:
- A349052 = compositions, directed A129852/A129853, complement A349053.
- A349056 = permutations of prime indices, complement A349797.
- A349057 = complement of standard composition numbers (too dense).
- A349058 = patterns, complement A350138.
- A349059 = ordered factorizations, complement A350139.
- A349060 = partitions, complement A349061.
Sequence in context: A068037 A167188 A295720 * A296152 A354840 A014764
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 16 2021
EXTENSIONS
a(21) onwards from Andrew Howroyd, Jan 31 2024
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 August 29 10:57 EDT 2024. Contains 375512 sequences. (Running on oeis4.)