Algrorithm for finding the sum of all possible combinations of product of k integers out of n integers