The main theorem establishes the generating function F which counts the number of times the staircase 1+2+3+⋯+m+ fits inside an integer composition of n. F=km–qxmy1−xkm−1(1−q)x(m+12)(y1−x)m+1−x−xy1−x(km–qxmy1−xkm−1). where km=∑j=0m−1xmj–(j2)(y1−x)j.
Here x and y respectively track the composition size and number of parts, whilst q tracks the number of such staircases contained.