De Bruijn Sequences
The cyclic de Bruijn sequences shown inside include all the substrings of a given length as shown outside.
Arbitrary order de Bruijn sequences become too long for this Demonstration rather quickly. Their lengths grows according to the function: LengthOfAlphabet^Order.
"De Bruijn Sequences"
Wolfram Demonstrations Project
Published: March 7 2011