--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail
Jan Medina
unread,
Apr 19, 2014, 7:04:26 PM4/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-s...@googlegroups.com
i know that but this function only give you one generator, always the same but i want a random generator of a multiplicate group of a finite field.
Jan Medina
unread,
Apr 20, 2014, 3:11:47 PM4/20/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-s...@googlegroups.com
I did this algorithm to find a primitive element of a multiplicative group on a finite field. This is a basic algorithm def random_primitive(p,h): F.<x>=GF(p^h) s=p^h-1 r=F.random_element() j=0 if r!=0: for t in prime_factors(s): if r^(s/t)==1: j=j+1 if j==0: return r else: return random_primitive(p,h) else: return random_primitive(p,h)
John Cremona
unread,
Apr 20, 2014, 4:00:37 PM4/20/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SAGE support
Any reason not to just test r.multiplicative_order() ?