The shortest circular sequence of length such that every string of length on the alphabet of size occurs as a contiguous subrange of the sequence described by . For example, a de Bruijn sequence of order on the alphabet is given by .
A de Bruijn sequence can be generated in the Wolfram Language using DeBruijnSequence[list, n].
Every de Bruijn sequence corresponds to an Eulerian cycle on a de Bruijn graph. Surprisingly, it turns out that the lexicographic sequence of Lyndon words of lengths divisible by gives the lexicographically smallest de Bruijn sequence (Ruskey).
de Bruijn sequences can be generated by feedback shift registers (Golomb 1967; Ronse 1984; Skiena 1990, p. 196).