Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica > Number Theoretic Functions >

IntegerPartitions

IntegerPartitions[n]
gives a list of all possible ways to partition the integer n into smaller integers.
IntegerPartitions[n, k]
gives partitions into at most k integers.
IntegerPartitions[n, {k}]
gives partitions into exactly k integers.
IntegerPartitions[n, {kmin, kmax}]
gives partitions into between kmin and kmax integers.
IntegerPartitions[n, kspec, {s1, s2, ...}]
gives partitions involving only the si.
  • The si can be rational numbers, and can be negative.
  • n can be a rational number if the si are rational numbers.
  • In the list of partitions, those involving earlier si are given last.
New in 6
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team