Let $f(x, y, z)$ is the number of distinct ways of representing $x$ as a sum of at most $y$ positive integers that are all smaller or equal to $z$. Moreover, If $yz < x$, then the function gives 0.  

The function can be defined in one of the following equivalent ways.


* The number $f(x,y,z)$.
* The number of all partitions (meaning: without considering the ordering)
$x = a\_1 + \ldots + a\_y$, where $a\_i \in \mathbb{Z}\_{\geq 0}$ and $a\_i \leq z$ for all $i$.
* The sum over the number of all partitions $x = a\_1 + \ldots + a\_l$, where $a\_i \in \mathbb{Z}\_{\geq 1}$ and $a\_i \leq z$ for all $i$,
where $l$ runs from $0$ to $k$.
* The number of ways of throwing
$x$ indistinguishable balls into $y$ indistinguishable bins, where each bin can contain up to $z$ balls.


Can we write $f$ as a function from $\mathbb Z^3 \to \mathbb Z$ ? probably recursively.? Or represent it somehow combinatorially using some partition function etc.?


**PS**: I am not looking for q-binomial formula because that gives " The number of ways of throwing $x$ **distinguishable** balls into $y$ indistinguishable bins, where each bin can contain up to $z$ balls." Instead, I am asking for "The number of ways of throwing $x$ **indistinguishable** balls into $y$ indistinguishable bins, where each bin can contain up to $z$ balls.
"



Combinatorial representation of function
I'll rename all three of your variables; you are asking for the number of partitions of $k$ that fit into an $m \times n$ box. This is famously known to be the coefficient of $q^k$ in the [$q$-binomial coefficient](https://en.wikipedia.org/wiki/Gaussian_binomial_coefficient)


$${m+n \choose m}\_q = \frac{[m+n]\_q!}{[m]\_q! [n]\_q!}$$


where $[n]\_q! = \prod\_{i=1}^n \left( \frac{q^i - 1}{q - 1} \right)$ is the $q$-factorial. Much is known about these, including a $q$-analog of Pascal's identity that leads to a recurrence.


