I can't seem to get this to work. According to wikipeda, the longest element of $S_n$ should be expressible as a product of $n(n-1)/2$ adjacent transpositions by $$ (n, n-1)(n-1,n-2)\cdots(21)(n-1,n-2)(n-2,n-3)\cdots $$ but I don't understand what pattern they're trying to imply. This should be the order reversing permutation, but even for $n=4$, I think I'm doing it wrong.
I think that pattern says, for $n=4$, the longest element should be expressible as $6$ adjacent transpositions $$ (43)(32)(21)(32)(21)(21)=(43)(32)(21)(32) $$ but that's not right since it fixes $2$ instead of sending $2$ to $3$. What am I reading wrong?
It should be
$$(n,n-1)(n-1,n-2)\cdots (2,1)(n,n-1)(n-1,n-2)\cdots(3,2) \cdots (n,n-1)(n-1,n-2)(n,n-1)$$
so for $S_4$ it is $(4,3)(3,2)(2,1)(4,3)(3,2)(4,3)$.