ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 18 Sep 2014 10:10:45 -0500There is something wrong with the generator of a finite fieldhttp://ask.sagemath.org/question/24187/there-is-something-wrong-with-the-generator-of-a-finite-field/ Hi, I am using the sentence" K.<g>=GF(q) " to generate a finite field F_q. When q is a power bigger than 1 of a prime, it is OK. However, when q is a prime, then g turns to be 1. Apparently, 1 is not a generator of a finite field, at least not a generator of the multiplicative group F_{q}^{*}Thu, 18 Sep 2014 09:46:56 -0500http://ask.sagemath.org/question/24187/there-is-something-wrong-with-the-generator-of-a-finite-field/Answer by tmonteil for <p>Hi, I am using the sentence" K.<g>=GF(q) " to generate a finite field F_q. When q is a power bigger than 1 of a prime, it is OK. However, when q is a prime, then g turns to be 1. Apparently, 1 is not a generator of a finite field, at least not a generator of the multiplicative group F_{q}^{*}</p>
http://ask.sagemath.org/question/24187/there-is-something-wrong-with-the-generator-of-a-finite-field/?answer=24190#post-id-24190Actually ``1`` is a generator of the kield ``K`` if ``q`` is prime, since ``K`` is the smallest field containing ``1``.
If you want a generator of the multiplicative group ``K^*``, you can do:
sage: K.multiplicative_generator()
Thu, 18 Sep 2014 10:10:45 -0500http://ask.sagemath.org/question/24187/there-is-something-wrong-with-the-generator-of-a-finite-field/?answer=24190#post-id-24190