If we set k = 2, the generating algorithm is an example of a linear feedback shift register (LFSR) sequence. As noted near the end of the post, the case k = 2 is especially important in application, i.e.
These are optimal sequences that contain every possible consecutive sequence of n symbols from an alphabet of size k. The previous post looked at an algorithm for generating De Bruijn sequences B( k, n) where k is a prime number.