Recently I came across a question related to combinatorics where you had to find all the number of ways to distribute a particular sum(N) into 3 numbers(different or same) such that the combined sum of these numbers is N and each of the chosen number is less than or equal to a given number(K)?? Anyone has any idea how to solve this problem??
/incorrect/
This is incorrect. The answer should depend on the value of N. Take N = 6 and K = 2. The answer is 1, but your formula gives 11.
A general way to solve this (not just limited to 3 partitions), assuming the partitions are ordered: https://math.stackexchange.com/questions/98065/how-many-ways-can-b-balls-be-distributed-in-c-containers-with-no-more-than