OFFSET
0,5
COMMENTS
An anti-run is a sequence with no adjacent equal parts. The number of maximal anti-runs is one more than the number of adjacent equal parts.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1325
FORMULA
T(n,k) = A005649(n-k) * binomial(n-1,k-1) for k > 0. - Andrew Howroyd, Dec 31 2020
EXAMPLE
Triangle begins:
1
0 1
0 2 1
0 8 4 1
0 44 24 6 1
0 308 176 48 8 1
0 2612 1540 440 80 10 1
0 25988 15672 4620 880 120 12 1
0 296564 181916 54852 10780 1540 168 14 1
Row n = 3 counts the following sequences (empty column indicated by dot):
. (1,2,1) (1,1,2) (1,1,1)
(1,2,3) (1,2,2)
(1,3,2) (2,1,1)
(2,1,2) (2,2,1)
(2,1,3)
(2,3,1)
(3,1,2)
(3,2,1)
MATHEMATICA
allnorm[n_]:=If[n<=0, {{}}, Function[s, Array[Count[s, y_/; y<=#]+1&, n]]/@Subsets[Range[n-1]+1]];
Table[Length[Select[Join@@Permutations/@allnorm[n], Length[Split[#, UnsameQ]]==k&]], {n, 0, 5}, {k, 0, n}]
PROG
(PARI) \\ here b(n) is A005649.
b(n) = {sum(k=0, n, stirling(n, k, 2)*(k + 1)!)}
T(n, k)=if(n==0, k==0, b(n-k)*binomial(n-1, k-1)) \\ Andrew Howroyd, Dec 31 2020
CROSSREFS
A000670 gives row sums.
A005649 gives column k = 1.
A337507 gives column k = 2.
A337505 gives the diagonal n = 2*k.
A106356 is the version for compositions.
A335461 has the reversed rows (except zeros).
A003242 counts anti-run compositions.
A124762 counts adjacent equal terms in standard compositions.
A124767 counts maximal runs in standard compositions.
A333381 counts maximal anti-runs in standard compositions.
A333382 counts adjacent unequal terms in standard compositions.
A333489 ranks anti-run compositions.
A333769 gives maximal run-lengths in standard compositions.
A337565 gives maximal anti-run lengths in standard compositions.
KEYWORD
nonn,tabl
AUTHOR
Gus Wiseman, Sep 06 2020
EXTENSIONS
Terms a(45) and beyond from Andrew Howroyd, Dec 31 2020
STATUS
approved