Here's some hints to get you going, and then if you get stuck you can ask more pointed questions: To find a recursive formulation, first give a high-level description of what you want to achieve, then see if you can identify the recursive nature of the problem. To do that, you'll probably need to generalize your problem.
So let me give you the high-level description of your problem, in its concrete form:
"Print out all 4-tuples of non-negative numbers such that their sum is 4."
I'd generalize that to
"Print out all n-tuples of non-negative numbers such that their sum is k."
Now try if you can solve that task recursively.