Generation of linear and non-linear maximum length sequences