Seq2:=[ #The first 30 terms of the sequence enumerating 1234-avoiding permutations of length n [1, 2, 6, 23, 103, 513, 2761, 15767, 94359, 586590, 3763290, 24792705, 167078577, 1148208090, 8026793118, 56963722223, 409687815151, 2981863943718, 21937062144834, 162958355218089, 1221225517285209, 9225729232653663, 70209849031116183, 537935616492552297, 4147342550996290153, 32159907636432567578, 250717538500344886206, 1964347085978431234383, 15462159345628498316319, 122238900487877503161969], #The first 30 terms of the sequence enumerating permutations of length n with exactly ONE occurrence of the pattern 1234 [0, 0, 0, 1, 12, 102, 770, 5545, 39220, 276144, 1948212, 13817680, 98679990, 710108396, 5150076076, 37641647410, 277202062666, 2056218941678, 15358296210724, 115469557503753, 873561194459596, 6647760790457218, 50871527629923754, 391345137795371013, 3025568471613091692, 23501724670464335914, 183370520135071994536, 1436795093911521996331, 11303188383039278887124, 89260541978520331533700], #The first 30 terms of the sequence enumerating permutations of length n with exactly TWO occurrence of the pattern 1234 [0,0, 0, 0, 4, 63, 665, 5982, 49748, 396642, 3089010, 23745117, 181282899, 1379847138, 10496697584, 79928658289, 609847716251, 4665446254886, 35801131210504, 275638351332190, 2129514056354378, 16509890253429971, 128449405928666831, 1002835093225654416, 7856166360951643384, 61750763266037935474, 486952329662650384372, 3852139442247028211940, 30566543105722892666310, 243263020341718807225691]]: # This took, 37564.359, seconds.