OFFSET
0,2
COMMENTS
An anti-run is a sequence with no adjacent equal parts.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..200
FORMULA
a(n) = A005649(n)*binomial(2*n-1,n). - Andrew Howroyd, Dec 31 2020
EXAMPLE
The a(2) = 24 sequences:
(2,1,2,2) (1,2,3,3) (1,2,2,3) (1,1,2,3)
(2,2,1,2) (1,3,3,2) (1,3,2,2) (1,1,3,2)
(1,2,2,1) (2,1,3,3) (2,2,1,3) (2,1,1,3)
(2,1,1,2) (2,3,3,1) (2,2,3,1) (2,3,1,1)
(1,1,2,1) (3,3,1,2) (3,1,2,2) (3,1,1,2)
(1,2,1,1) (3,3,2,1) (3,2,2,1) (3,2,1,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[2*n], Length[Split[#, UnsameQ]]==n&]], {n, 0, 3}]
PROG
(PARI) \\ here b(n) is A005649.
b(n) = {sum(k=0, n, stirling(n, k, 2)*(k + 1)!)}
a(n) = {b(n)*binomial(2*n-1, n)} \\ Andrew Howroyd, Dec 31 2020
CROSSREFS
A336108 is the version for compositions and runs.
A337504 is the version for compositions.
A337506 has this as main diagonal n = 2*k.
A337564 is the version for runs.
A000670 counts sequences covering an initial interval.
A003242 counts anti-run compositions.
A005649 counts anti-runs covering an initial interval.
A124767 counts maximal runs in standard compositions.
A333381 counts maximal anti-runs in standard compositions.
A333769 gives run-lengths in standard compositions.
A337565 gives anti-run lengths in standard compositions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 05 2020
EXTENSIONS
Terms a(5) and beyond from Andrew Howroyd, Dec 31 2020
STATUS
approved