How to effectively make ascending sequences?

I am currently trying to make a program which involves ascending sequences. N is for the size of the sequence and K is the maximum number, for example

Input:

2,3

Output:

6 (1,1 - 1,2 - 1,3 - 2,2 - 2,3 - 3,3)

My current code doesn't output 6 but 3. I know this is probably not the way to find the amount of sequences. From what I see, something is wrong in the recursion. Can you please help me find the problem and fix it?