UPDATE: I have realized the problem below is not possible to answer in its current form because of the large amount of data involved(15k+ items). I just found out, the
I may be wrong but could this be viewed as a integer partition (was Triangle number, but I remembered I misremembered ) problem?
If that's the case, each entry would have a membership to a set of results for a given sum. Precalculating and caching the membership results for a given sum (yes a huge table) could form a very quick solution.
I could probably do it, but I'd need a large data set. Interesting though...
Consult the guru Knuth http://cs.utsa.edu/~wagner/knuth/fasc3b.pdf