P123

One of the most challenging problems in enumerative combinatorics is to count Wilf classes, where you are given a pattern, or set of patterns, and you are asked to find a “formula”, or at least an efficient algorithm, that inputs a positive integer n and outputs the number of permutations avoiding that pattern. P123, to enumerate permutations containing exactly r occurrences of the pattern 123 for r=0,1,2,3, ...