# Frank Luebeck’s tables of Conway polynomials over finite fields¶

class sage.databases.conway.ConwayPolynomials

Initialize the database.

degrees(p)

Return the list of integers n for which the database of Conway polynomials contains the polynomial of degree n over GF(p).

EXAMPLES:

sage: c = ConwayPolynomials()
sage: c.degrees(60821)
[1, 2, 3, 4]
sage: c.degrees(next_prime(10^7))
[]

has_polynomial(p, n)

Return True if the database of Conway polynomials contains the polynomial of degree n over GF(p).

INPUT:

• p – prime number

• n – positive integer

EXAMPLES:

sage: c = ConwayPolynomials()
sage: c.has_polynomial(97, 12)
True
sage: c.has_polynomial(60821, 5)
False

polynomial(p, n)

Return the Conway polynomial of degree n over GF(p), or raise a RuntimeError if this polynomial is not in the database.

Note

See also the global function conway_polynomial for a more user-friendly way of accessing the polynomial.

INPUT:

• p – prime number

• n – positive integer

OUTPUT:

List of Python int’s giving the coefficients of the corresponding Conway polynomial in ascending order of degree.

EXAMPLES:

sage: c = ConwayPolynomials()
sage: c.polynomial(3, 21)
(1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
sage: c.polynomial(97, 128)
Traceback (most recent call last):
...
RuntimeError: Conway polynomial over F_97 of degree 128 not in database.

primes()

Return the list of prime numbers p for which the database of Conway polynomials contains polynomials over GF(p).

EXAMPLES:

sage: c = ConwayPolynomials()
sage: P = c.primes()
sage: 2 in P
True
sage: next_prime(10^7) in P
False

class sage.databases.conway.DictInMapping(dict)

Places dict into a non-mutable mapping.