Bill Allombert on Fri, 04 Nov 2022 10:06:05 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Primitive Polynomials |
On Fri, Nov 04, 2022 at 09:54:37AM +0100, Martin Becker wrote: > > Hello, > > I would like to have an option for ffgen to return a primitive > polynomial rather than just some random irreducible polynomial. > Preferrably a Conway polynomial but, for many use cases, > any will do. Would that be hard to implement? Pari could > iterate through irreducible polynomials until Mod(x,candidate) > has maximal order. Please excuse me if that functionality is > already present somewhere but I didn't notice. It is indirectly possible by using ffprimroot: minpoly(ffprimroot(ffgen([p,n]))) ? minpoly(ffprimroot(ffgen([7,5]))) %1 = Mod(1,7)*x^5+Mod(2,7)*x^4+Mod(4,7)*x^3+Mod(2,7)*x^2+Mod(4,7)*x+Mod(2,7) Cheers, Bill.