I have arrived at the combinatorial problem of enumerating certain types of ballot paths. This has led to analyzing the sequence defined by the following recurrence
$$ f(n,m) = \begin{cases} f(n, \thinspace m-1) + f(n-m, \thinspace m-1), & \text{ if } n \leq \left \lceil \binom{m}{2}/2 \right \rceil \\ f(n-m, \thinspace m-1), & \text{ if } n > \lceil \binom{m}{2}/2 \rceil \end{cases} $$
where $f(n,0) = \begin{cases} 1, & \text{ if } n = 0 \\ 0, & \text{ if } n \neq 0 \end{cases}$
I note that the recurrence $f(n, \thinspace m) = f(n, \thinspace m-1) + f(n-m, \thinspace m-1)$ alone counts the number of partitions of $n$ into distinct parts bounded by $m$, so a closed formula for my sequence is probably out of the question.
Question: Is it possible to obtain a generating function for this sequence?
I have seen many threads here regarding generating functions for recurrences with two parameters, but none of them deals with recurrences including a conditional.
In fact, any useful info regarding such recurrences would be appreciated.