I want to find out what this algorithm is called
int s(int m, int n) {
if (m == 1 || n == 1) {
return 1;
} else if (n >= m) {
return s(m, m - 1) + 1;
} else {
return s(m - n, n) + s(m, n - 1);
}
}

I think it counts possible sums with limited summands
like s(5,5)=7
- 1+1+1+1+1
- 2+1+1+1
- 2+2+1
- 3+1+1
- 3+2
- 4+1
- 5
Found a solution: