Avoid mesh patterns of permutations of length three (123,231,132,312,321,213) from permutations of length x to give a sequence of numbers popularly found in The On-Line Encyclopedia of Integer Sequences (OEIS).
Also to obtain the distribution of patterns within permutations of various lengths.