n=2: (12) has one pattern of length 1 and one of length 2 and a(2) = 2.
n=4: (2413) has one pattern of length 1, 2 of length 2 (namely 24 and 21), 4 of length 3 (namely 243, 241, 213, 413) and one of length 4 (namely 2413), and this is maximal, and a(4)=8.