ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 18 Sep 2014 17:10:45 +0200There is something wrong with the generator of a finite fieldhttps://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 16:46:56 +0200https://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>
https://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 17:10:45 +0200https://ask.sagemath.org/question/24187/there-is-something-wrong-with-the-generator-of-a-finite-field/?answer=24190#post-id-24190