In how many ways an integer $N$ can be partitioned into exactly $T$ parts such that
$T = \lfloor N/K \rfloor + 1$
$N = A_1 + A_2 + \cdots+ A_T$ where order matters
$0 \lt A_i \leq K$
$ N \bmod K \neq 0 $
I mean I have a recursive formula
$F(N, K) = \sum_{i=1}^k F(N-i, K - 1)$ if $K > 1$
$F(N, 1) = 1$ for $N > 0$ and $ N \leq K$
$F(N, K)$ is counting number of ways in which this can be done. Can this be computationally improved?
I think that given your recursion the orders of the $A_i$ matter.
Notice $N=TK-K$.
If we let $B_j=K-A_j$ then we just want to count the partitions of $K$ into $T$ parts, this is just $\binom{K+T-1}{T-1}$