OFFSET
0,3
COMMENTS
A sequence is alternately co-strong if either it is empty, equal to (1), or its run-lengths are weakly increasing (co-strong) and, when reversed, are themselves an alternately co-strong sequence.
EXAMPLE
The a(1) = 1 through a(5) = 12 compositions:
(1) (2) (3) (4) (5)
(11) (12) (13) (14)
(21) (22) (23)
(111) (31) (32)
(112) (41)
(121) (113)
(1111) (131)
(212)
(221)
(1112)
(1121)
(11111)
For example, starting with the composition y = (1,6,2,2,1,1,1,1) and repeatedly taking run-lengths and reversing gives (1,6,2,2,1,1,1,1) -> (4,2,1,1) -> (2,1,1) -> (2,1) -> (1,1) -> (2). All of these have weakly increasing run-lengths and the last is a singleton, so y is counted under a(15).
MATHEMATICA
tniQ[q_]:=Or[q=={}, q=={1}, And[LessEqual@@Length/@Split[q], tniQ[Reverse[Length/@Split[q]]]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], tniQ]], {n, 0, 10}]
CROSSREFS
The case of partitions is A317256.
The recursive (rather than alternating) version is A332274.
The total (rather than alternating) version is (also) A332274.
The strong version is this same sequence.
The case of reversed partitions is A332339.
The normal version is A332340(n) + 1 for n > 1.
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Feb 17 2020
STATUS
approved