|P is for Practical|
Re (tilly) 1: (Golf as well): List of Partitionsby tilly (Archbishop)
|on May 06, 2001 at 16:32 UTC||Need Help??|
Occasionally I wish I hadn't given away most of my math books, this is one of those occasions. I had a book with lots about partitions in it, but I long ago gave it away. However this problem is quite doable. The trick is to make P a function of 2 variables, first the number n you are interested in partitioning, and then the number i that is the largest number you are willing to partition it into.
With that tip, here is an answer in 90 characters: