Sharedsupport / 2016-06-28-233933.sagewsOpen in CoCalc
Examples for support purposes...
f = (x^8 - x^4 + 1)*(x^4 - x^2 + 1)*(x^4 + 1)*(x^2 + x + 1)*(x^2 - x + 1)*(x^2 + 1)*(x + 1)*(x - 1)
f
(x^8 - x^4 + 1)*(x^4 - x^2 + 1)*(x^4 + 1)*(x^2 + x + 1)*(x^2 - x + 1)*(x^2 + 1)*(x + 1)*(x - 1)
v = f.factor_list()
v
[(x^8 - x^4 + 1, 1), (x^4 - x^2 + 1, 1), (x^4 + 1, 1), (x^2 + x + 1, 1), (x^2 - x + 1, 1), (x^2 + 1, 1), (x + 1, 1), (x - 1, 1)]
v[0][0]
x^8 - x^4 + 1
v[1][0]
x^4 - x^2 + 1