Enumerating all p-tuples of positive integer lower or equal than k that sum up to n.
In this small account we consider the following combinatorial problem:
Enumerate all p-tuples of non-negative integers lower or equal than k that sums up to n.
Example: p = 2, n = 2, k = 2:
(1, 1), (0, 2), (2, 0)