Possible nusum bug in Maxima 5.30, possibly later



Hello all,

I found a potential issue with nusum and an easy workaround.

First, what I expect:
If nusum(f(x),x,0,k) and nusum(g(x),x,0,k) work without error, then nusum(
f(x) + g(x),x,0,k) should work without error. I am using Maxima 5.30, I
know this is old.

I'm not sure if the following is the intended behavior.
(%i1) nusum(a^k,k,0,i);
(%o1) a^(i+1)/(a-1)-1/(a-1)

(%i2) nusum(%,i,0,n);
(a^(i+2)-1)/(a^(i+1)-1) non-rational term ratio to nusum
(%o2) sum(a^(i+1)/(a-1)-1/(a-1),i,0,n)

(%i3) nusum(a^(i+1)/(a-1),i,0,n) - nusum(1/(a-1),i,0,n);
(%o3) -(n+1)/(a-1)+a^(n+2)/(a-1)^2-a/(a-1)^2

Clearly, maxima is mistaken when it says
"(a^(i+2)-1)/(a^(i+1)-1) non-rational term ratio to nusum"