How to convert this loop into a closed form expression?
I have the following code in Python
total=0 for x in range(lowerBound,upperBound+1,2): total+=(x*x*x+5*x)/3+2
This iterates from x=lowerBound to the maximum value of x=upperBound (going by intervals of 2 at a time), tossing the value of $\lfloor(x^3+5x)/3\rfloor+2$ into the total (all division is floor division in Python unless using decimals, which I'd like to avoid if possible for precision's sake).
How can I convert this to a closed form expression?