|
|
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
|
|
|
FORMULA
|
|
|
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
|
The complement is counted by A349052.
The version for ordered prime factorizations is A349797, complement A349056.
The version for ordered factorizations is A350139.
A001700 counts compositions of 2n with alternating sum 0.
A003242 counts Carlitz (anti-run) compositions.
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.
Cf. A102726, A114901, A128761, A261983, A333213, A333755, A344614, A344615, A345165, A345170, A345195, A349799, A349800, A350251, A350252.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|