Hello Jean,
About the "n - not defined", it is because you have to nest the second sum in the first, otherwise n is (correctly) undefined. Other things to check later... Thank you for the works as well as the references!
While written correctly, you should be able to highlight the outer sum argument like in this picture:
![2017-08-19 18_03_26-SMath Studio - [Integrate_4%20[Conflict%20Sum%20series].sm_].png](/en-US/file/Hn8xZg/2017-08-19-18_03_26-SMath-Studio---_Integrate_4_20_Conflict_20Sum_20series__sm___png)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects