1 | initial version |
The ring you need is the ring of Eisenstein integers.
It is implemented in Sage as EisensteinIntegers()
.
Try this:
sage: P.<j> = EisensteinIntegers()
sage: P
Eisenstein Integers in Number Field in j with defining polynomial x^2 + x + 1 with j = -0.50000000000000000? + 0.866025403784439?*I
sage: j
j
sage: j^2
-j - 1
sage: j^3
1
sage: 1 + j + j^2
0