Recursion has two important parts:
1. An "exit case" - where a condition is reached such that no more recursive calls are made. In your example, k==1 is the exit case.
2. The recursive call - where...