  The discrete Fourier transform can be viewed as an isomorphism of the group
algebra of a cyclic group to its decomposition in terms of irreducible
representations when the characteristic of the field does not divide the order
of the group. We describe the DFT when $p|n$ by factoring $x^N - 1$ over finite
fields. For the symmetric group, the Fourier transform is implemented using
representations, Specht modules $S^\lambda$ for partitions $\lambda$, and
Maschke's theorem. In the modular case, we construct the Pierce decomposition
using central primitive orthogonal idempotents $e_i$ in SageMath, yielding a
change-of-basis matrix which generalizes the DFT.
