answered 3 years ago
Does this solve your problem?:
R.<x>=IntegerModRing(15)[] f=1+x^2+4*x^6 coeffs=(f.coefficients(sparse=False)) show(coeffs)