OFFSET
0,3
COMMENTS
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
FORMULA
a(n>0) = A351016(n)/2.
G.f.: Sum_{k>=0} floor(k/2)! * ceiling(k/2)! * ([y^floor(k/2)] P(x,y)) * ([y^ceiling(k/2)] P(x,y)), where P(x,y) = Product_{k>=1} 1 + y*x^k. - Andrew Howroyd, Feb 11 2022
EXAMPLE
The a(1) = 1 through a(6) = 18 compositions:
(1) (2) (3) (4) (5) (6)
(1,1) (1,2) (1,3) (1,4) (1,5)
(2,1) (2,2) (2,3) (2,4)
(3,1) (3,2) (3,3)
(1,1,2) (4,1) (4,2)
(2,1,1) (1,1,3) (5,1)
(1,2,2) (1,1,4)
(2,2,1) (1,2,3)
(3,1,1) (1,3,2)
(2,1,3)
(2,3,1)
(3,1,2)
(3,2,1)
(4,1,1)
(1,1,2,2)
(1,2,2,1)
(2,1,1,2)
(2,2,1,1)
MATHEMATICA
Table[Length[Select[Tuples[{0, 1}, n], #=={}||First[#]==1&&UnsameQ@@Split[#]&]], {n, 0, 10}]
PROG
(PARI) P(n)=prod(k=1, n, 1 + y*x^k + O(x*x^n));
seq(n)=my(p=P(n)); Vec(sum(k=0, n, polcoef(p, k\2, y)*(k\2)!*polcoef(p, (k+1)\2, y)*((k+1)\2)!)) \\ Andrew Howroyd, Feb 11 2022
CROSSREFS
The case of partitions is A000726.
The version for run-lengths instead of runs is A032020.
These words are ranked by A175413.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A116608 counts compositions by number of distinct parts.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329738 counts compositions with equal run-lengths.
A329744 counts compositions by runs-resistance.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
- A351202 = permutations of prime factors.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 09 2022
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Feb 11 2022
STATUS
approved