First specify the alphabet of allowable symbols.
The first step is to construct all sequences consisting of at least one 0, followed by at least one 1. This is an infinite set so only a sample of the set is shown. The sequences in this display are chosen in order of length over the given alphabet.
By default, at least 30 sequences are shown. The actual number is often greater because once one sequence of a given length is included, all sequences of that same length are included.
The full set of sequences is obtained by repeating this alternating pattern an arbitrary number of times. The Star(S) construct corresponds to this notion. The desired set of sequences is constructed by the command :
Here we have overridden the default settings by indicating that we want at least 50 sequences using the size criteria is the number of terms nops.
The corresponding generating function is