tests whether poly is a primitive polynomial modulo a prime p.


  • The polynomial poly must be univariate.


open allclose all

Basic Examples  (2)

Test whether a polynomial is primitive modulo 13:

This polynomial can be factored modulo 2, and therefore it is not primitive:

Scope  (3)

Test for primitivity of a univariate polynomial modulo a prime:

Polynomials can be given in non-expanded form:

Coefficients of the polynomial do not have to be integers:

Properties & Relations  (4)

A polynomial must be irreducible in order to be primitive:

Irreducibility is a necessary but not-sufficient condition for a polynomial to be primitive:

A trinomial whose order is a Mersenne prime exponent is primitive modulo 2 if and only if it is irreducible:

Primitivity of a polynomial depends on the choice of prime:

Introduced in 2017