When integrating a series, the constant from the integration is evaluated as part of the summation or is it as a constant "outside" of the whole summation?

Say I have

Then is the result equals to this: ?

Or is the result equals to this: ?

Thanks!