F123

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. F123, Also to enumerate permutations containing exactly r occurrences of the pattern 123 for r=0,1,2,3, ... but made more efficient for small r, and also shows an approach how to rigorously prove the ”conjectured” expressions for the number of permutations with exactly r occurrences of the pattern 123 for r=1,2,3, [we only did it for r=1, but the approach could be used in general, but is it worth it?]