algorithm to slice a number into parts
kurtosis: if interested in integer partitions this python should do the jobdef intpart(n):    if n == 0:

        yield []

    for k in range(1,n+1):

        for p in intpart(n-k):

            yield [k] + p


i believe that this isn't truly integer partitions because it will count 4 = 1,1,2,1 and 1,1,1,2 as different partitions but that's all I can give you between breakfast and work.see wikipedia for integer partiton or young tableau for more on these interesting objects