The standard output in SAGE for $p$-adic numbers is in the series representation:
sage: x = Zp(7)(12495)
sage: x
3*7^2 + 7^3 + 5*7^4 + O(7^22)
Is there a way to change it to a "sequence" representation, like
(..., 12495, 490, 147, 0, 0)
The standard output in SAGE for $p$-adic numbers is in the series representation:
sage: x = Zp(7)(12495)
sage: x
3*7^2 + 7^3 + 5*7^4 + O(7^22)
Is there a way to change it to a "sequence" representation, like
(..., 12495, 490, 147, 0, 0)
You could use the
.list()method to get the coefficients.and cook up something from there:
but you can get the residues you want directly with this command
There doesn't seem to be a
residue_listmethod which would give the whole list all at once.Note that you can discover the methods available for the object
xby typingand hitting the TAB key.