Calculating Partitions of a Number