I want to extract the elements of a Pari/GP p-adic number to a vector. I.e., if this is my p-adic number:
O(5^8)+1/3
> 2 + 3*5 + 5^2 + 3*5^3 + 5^4 + 3*5^5 + 5^6 + 3*5^7 + O(5^8)
I want to be able to extract a vector like this:
[2,3,1,3,1,3,1,3]
Is there a direct way to do this or do I have to write my own function?