| Bill Allombert on Sat, 02 Jul 2022 23:11:28 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: all divisors of a cyclotomic integer |
On Sat, Jul 02, 2022 at 03:16:27PM -0400, Max Alekseyev wrote:
> Hello,
>
> What would be the easiest way to get all divisors of a cyclotomic integer?
> For example, how to get all divisors of 4 modulo polcyclo(21).
Use idealfactor and bnfisprincipal ?
bnf=bnfinit(polcyclo(21,a),1);
id=idealfactor(bnf,4);
{
my(L=List());
forvec(v=apply(a->[1,a],id[,2]),
my(v=bnfisprincipal(bnf,idealfactorback(bnf,id[,1],v)));
if(v[1]==0,listput(~L,v[2])));
Vec(L)
}
Cheers,
Bill.