The Distribution of Run Lengths in Integer Compositions

  • Herbert S. Wilf


We find explicitly the generating function for the number of compositions of $n$ that avoid all words on a given list of forbidden subwords, in the case where the forbidden words are pairwise letter-disjoint. From this we get the gf for compositions of $n$ with no $k$ consecutive parts equal, as well as the number with $m$ parts and no consecutive $k$ parts being equal, which generalizes corresponding results for Carlitz compositions.