The factor command factors polynomials with coefficients in ℤ/pℤ. (See also Section 5.12.10.)
Input:
Output: