Nextprime - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Algebra : Polynomials : Nextpoly

Nextprime

next irreducible polynomial over a finite field

Prevprime

previous irreducible polynomial over a finite field

Nextpoly

next polynomial over a finite field

Prevpoly

previous polynomial over a finite field

 Calling Sequence Nextprime(f, x, alpha) mod p Prevprime(f, x, alpha) mod p Nextpoly(f, x, alpha) mod p Prevpoly(f, x, alpha) mod p

Parameters

 f - polynomial over a finite field x - name alpha - (optional) RootOf p - integer

Description

 • Nextpoly(f, x) mod p returns the next polynomial from f in x in lexicographical order over the integers modulo p. Similarly, Prevpoly(f, x) mod p returns the previous polynomial from f in x in lexicographical order over the integers modulo p.
 • Nextprime(f, x) mod p returns the next irreducible polynomial from f in x in lexicographical order over the integers modulo p. Similarly, Prevprime(f, x) mod p returns the previous irreducible polynomial from f in x in lexicographical order over the integers modulo p.
 • The optional third argument alpha specifies a representation for the finite field $\mathrm{GF}\left({p}^{k}\right)$.  The field extension alpha is specified by a RootOf a monic univariate polynomial of degree k which must be irreducible.  Thus, Nextprime(f, x, alpha) mod p computes the next irreducible polynomial from f in lexicographical order over $\mathrm{GF}\left({p}^{k}\right)$.

Examples

 > $f≔{x}^{4}$
 ${f}{≔}{{x}}^{{4}}$ (1)
 > $\mathrm{Nextpoly}\left(f,x\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${{x}}^{{4}}{+}{1}$ (2)
 > $\mathrm{Nextprime}\left(f,x\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${{x}}^{{4}}{+}{x}{+}{1}$ (3)
 > $\mathrm{Prevpoly}\left(f,x\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${{x}}^{{3}}{+}{{x}}^{{2}}{+}{x}{+}{1}$ (4)
 > $\mathrm{Prevprime}\left(f,x\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${{x}}^{{3}}{+}{{x}}^{{2}}{+}{1}$ (5)
 > $\mathrm{alias}\left(\mathrm{α}=\mathrm{RootOf}\left({y}^{2}+y+1\right)\right):$
 > $\mathrm{Nextpoly}\left(f,x,\mathrm{α}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${{x}}^{{4}}{+}{1}$ (6)
 > $\mathrm{Nextprime}\left(f,x,\mathrm{α}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${{x}}^{{4}}{+}{\mathrm{α}}{}{x}{+}{{x}}^{{2}}{+}{1}$ (7)
 > $\mathrm{Prevpoly}\left(f,x,\mathrm{α}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${\mathrm{α}}{}{{x}}^{{3}}{+}{\mathrm{α}}{}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{\mathrm{α}}{}{x}{+}{{x}}^{{2}}{+}{\mathrm{α}}{+}{x}{+}{1}$ (8)
 > $\mathrm{Prevprime}\left(f,x,\mathrm{α}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2$
 ${\mathrm{α}}{}{{x}}^{{3}}{+}{\mathrm{α}}{}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{\mathrm{α}}{}{x}{+}{{x}}^{{2}}{+}{\mathrm{α}}{+}{x}$ (9)
 > 

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam