[previous][up][top][index]
search for:

partitions -- list the partitions of an integer

partitions n -- returns a list of the partitions of the integer n.
partitions(n,k) -- returns a list of the partitions of the integer n into terms each of which does not exceed k.

i1 : partitions 4

o1 = {{4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}}

o1 : List
i2 : partitions(4,2)

o2 = {{2, 2}, {2, 1, 1}, {1, 1, 1, 1}}

o2 : List

Ways to use partitions :

  • partitions ZZ
  • partitions(ZZ,ZZ)

  • [previous][up][top][index]
    search for: