ChallengeMedium ShareChallenge · Medium problemHow many permutations a1a2⋯a6a_1a_2\cdots a_6a1a2⋯a6 of 1,2,…,61,2,\dots,61,2,…,6 avoid the pattern 231231231 (i.e. contain no indices i<j<ki<j<ki<j<k with ak<ai<aja_k<a_i<a_jak<ai<aj)?Check Show answer Walk through it step by step Practice more like this