function max_len_seq_ternary input Integer seed[:] = {0, 1, 2}; input Integer generator[size(seed, 1)] = {1, 2, 2}; input Real bias = 0 "Bias to control middle value"; output Real y[integer(3^(size(seed, 1)) - 1)]; end max_len_seq_ternary;