Previous Page Next Page Contents

combinat::partitions -- n-th partitions number

Introduction

combinat::partitions(n) returns the number of partitions of the nonnegative integer n.

Call(s)

combinat::partitions(n)

Parameters

n - a nonnegative integer

Returns

The number of partitions as a positive integer.

Details

Example 1

We can write 3 in 3 different ways as a sum of nonnegative integers. They are 3=1+1+1=1+2=3.

>> combinat::partitions(3)
                                     3

Example 2

The number of partitions of n grows very rapidly for larger n.

>> combinat::partitions(111)
                                 679903203

Example 3

A negative number cannot be written as a sum of positive integers.

>> combinat::partitions(-3)
      Error: Argument must be a nonnegative integer [combinat::parti\
      tions]

Further Documentation

G. Andrews, The Theory of Partitions, Addison-Wesley, 1976

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000