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.
Also the number of alternately strong integer partitions of n.
EXAMPLE
The a(1) = 1 through a(8) = 12 reversed partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (12) (13) (14) (15) (16) (17)
(111) (22) (23) (24) (25) (26)
(1111) (122) (33) (34) (35)
(11111) (123) (124) (44)
(222) (133) (125)
(1122) (1222) (134)
(111111) (1111111) (233)
(1133)
(2222)
(11222)
(11111111)
For example, starting with the composition y = (1,2,3,3,4,4,4) and repeatedly taking run-lengths and reversing gives (1,2,3,3,4,4,4) -> (3,2,1,1) -> (2,1,1) -> (2,1) -> (1,1) -> (2) -> (1). All of these have weakly increasing run-lengths and the last is equal to (1), so y is counted under a(21).
MATHEMATICA
tniQ[q_]:=Or[q=={}, q=={1}, And[LessEqual@@Length/@Split[q], tniQ[Reverse[Length/@Split[q]]]]];
Table[Length[Select[Sort/@IntegerPartitions[n], tniQ]], {n, 0, 30}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 17 2020
STATUS
approved