The combinations you are trying to compute are called integer partitions. Correspondingly you are after an integer partition algorithm.
A solution in python might look like:
def bubble(part, i=0): #add one to the list whilst keeping lexicographic order
if i == (len(part)-1) or part[i] < part[i+1]:
part[i] += 1
return part
else:
return bubble(part, i+1)
def partitions(n):
if n == 1:
yield [1]
return
for p in partitions(n-1):
yield [1] + p
yield bubble(p)
This is conceptually similar to Knuth's algorithm P in fascicle 3B.