are you sure thats the right formula? The denominator in your sum appears to be applying the same discount factor to all dividends, even though they happen at different times.
I think the formula you want is:
whichever formula you use, provided is constant you can write . You may be able to factorise depending on the values of and . Otherwise you have a cubic in s to solve, time to find a computer...