I need to define polynomials like $n\sum_{i=1}^aX^i +m \sum_{i=1}^bX^i$, where $a,b,n$ and $m$ are unknown integers, and then sum polynomials like this up. How should I do this in Sage?
Should I define the polynomial inductively by for loop? And how to make $a,b,n$ and $m$ to be variables? I am really new to programming, sorry for the basic questions!
Those polynomials in X are just standard geometric series so use the formula for that.