I need to sum the members of my progression using recursion. Here's the function which gives my progression and how to count a sum in recursion way?

```
#include <iostream>
using namespace std;
void progressionRec(int a1, int d, int n) {
if(n <= 1){
cout << a1 << " ";
} else {
int next = a1 + d;
progressionRec(next, d, n - 1);
cout << a1 << " ";
}
}
int main()
{
progressionRec(2,3,15);
return 0;
}
```

You can sum the members of your progression this way