Following this thread python-integer-partitioning-with-given-k-partitions
I want to find the number of such partitions (where the minimum part is equal to 1), but the following solution (in the thread and many other threads) gives the exact partitions of such an integer into k parts.
Since the algorithm is recursive and gives each partition I thought it might help me to just count the number of such partitions with memoization or dynamic programming, but I couldn't come up with a good solution.
So for example for n=7
and k=2
the result will be res=3
intead of res=[[1,6],[2,5],[3,4]]