MAT 3 - Blatt 11

\(<< \ D:\Daten\Math\poliesModP4.m\)

Bsp. 42

p = x^3 + 2  x + 1;

IsIrreduciblePoly[p, x, 3]

q = 3^3

EulerPhi[q - 1]

CoeffToPoly[lst_,  var_] := 
      Sum[lst[[i]]*var^(i - 1), {i, Length[lst]}]

CoeffToPoly[{1, 2, 0, 43}, x]

PolynomialList[var_, n_, m_] := 
      Map[CoeffToPoly[#, var] &, Tuples[Range[0, m - 1], n + 1]]

PolynomialList[x, 2, 3]

Complement[
      Select[PolynomialList[x, 2, 3], 
        IsPrimitiveElement[#, p, x, 3] &], {0}]

Length[%]

Bsp. 43

p2 = x^5 + x^2 + 1;

IsIrreduciblePoly[p2, x, 2]

q2 = 2^5

EulerPhi[q2 - 1]

Complement[
      Select[PolynomialList[x, 4, 2], 
        IsPrimitiveElement[#, p2, x, 2] &], {0}]

Length[%]

Bsp. 44

5^7

EulerPhi[5^7 - 1]