# Revision history [back]

When you have an element of x of GF(q^m), x.polynomial() gives you the polynomial (over GF(q)) that represents x, and then you can have its coefficients using .coefficients():

sage: R.<a> = GF(17^22)
sage: x = R.random_element()
sage: x.polynomial().coefficients()
[10, 15, 5, 16, 2, 1, 5, 9, 12, 10, 12, 3, 16, 9, 1, 16, 7, 7, 2, 10, 3, 4]


Though, I am not sure about your question since for $x\in\text{GF}(q^m)$, $x^{q^k} = x$.

When you have an element of x of GF(q^m), x.polynomial() gives you the polynomial (over GF(q)) that represents x, and then you can have its coefficients using .coefficients():

sage: R.<a> = GF(17^22)
sage: x = R.random_element()
sage: x.polynomial().coefficients()
[10, 15, 5, 16, 2, 1, 5, 9, 12, 10, 12, 3, 16, 9, 1, 16, 7, 7, 2, 10, 3, 4]


Though, I am not sure about your question since for $x\in\text{GF}(q^m)$, $x^{q^k} = x$.