Ask Your Question

Revision history [back]

The alternative solution from an answer to a previous question applies:

sage: F.<x> = GF(3^15)
sage: i = 231
sage: a = F(i.digits(3))
sage: ZZ(list(vector(a)),base=3)
231