Primitive Polynomials

Primitive polynomials for Galois field generation with binary polynomials up to GF(2^1200)

(1200 elements)

Examples

Basic Examples

Retrieve the resource:

In[1]:=
ResourceObject["Primitive Polynomials"]
Out[1]=

Retrieve the default content:

In[2]:=
ResourceData["Primitive Polynomials"]
Out[2]=

This table to 21200 wasn’t possible until June 17, 2015, when the factorization of 2991-1 was found. The factorization of 21207-1 is still unknown:

In[3]:=
ResourceData["Primitive Polynomials"]["GF(2^991)"]
Out[3]=

The pentanomials are of the form 1+x3+x9+x10+x991, with first value 1 and last value equaling the power of the Galois field. The other three terms are minimized:

In[4]:=
With[{data = ResourceData["Primitive Polynomials"]}, 
 ArrayPlot[
  Transpose[
   IntegerDigits[(# - 1)/2, 2, 26] & /@ 
    Table[data[[n]]["PentanomialValue"], {n, 7, 200}]], 
  ImageSize -> {600, 100}, PixelConstrained -> True, Frame -> False]]
Out[4]=

For gf(2n), there are exactly ϕ(2n-1)/n primitive polynomials, with ϕ being the Euler phi function. For gf(2198) there are 445562620157436107880286685277855599871889521579688722432 primitive polynomials. Dividing that by 2198 gives about 1/902, the odds that a random binary polynomial 1+...+x198 will be primitive, which also leads to 902 as the primitivity odds reciprocal. This number is bounded below by n. In this range, gf(2972) has the maximal reciprocal of 18639:

In[5]:=
With[{data = ResourceData["Primitive Polynomials"]}, 
 ListPlot[Table[
   data[[n]]["PrimitivityOddsReciprocal"] - n, {n, 2, 1200}], 
  AspectRatio -> 1/7]]
Out[5]=

With a primitive polynomial a finite field addition table can be produced:

In[6]:=
Monitor[ArrayPlot[
  Table[FromDigits[
    CoefficientList[
     PolynomialMod[x^m + x^n, 1 + x^4 + x^9, Modulus -> 2], x], 
    2], {n, 1, 2^9 - 1}, {m, 1, 2^9 - 1}], PixelConstrained -> True, 
  ImageSize -> {600, 600}, Frame -> False], {n, m}]
Out[6]=

Wolfram Research, "Primitive Polynomials" from the Wolfram Data Repository. (2017) https://doi.org/10.24097/wolfram.48521.data

Source Metadata

Data Downloads