Quote:

>>parts(n,k)-

>> returns the total number of partitions of n into k parts;

>> unless k is absent, in which case it returns the total number

>> of partitions of n (i.e. a sum over k <= n).

[snip]

>You probably want to mention the words "Stirling number" and "Bell

>number" somewhere in the documentation, so that any mathematicians

>who've had to memorize those names can spot them. Might help with

>keyword searches, too.

Now that I re-read your post after getting some much-needed sleep, I see

that you're talking about partitions of an integer, when I thought you

were talking about partitions of a set (a different, and rather simpler,

problem). Sorry for any confusion.

In any case, it could be nice to eventually expand the module to

efficiently compute all sorts of related combinatorical quantities.

--

Ilmari Karonen -- http://www.sci.fi/~iltzu/

"Get real! This is a discussion group, not a helpdesk. You post something,

we discuss its implications. If the discussion happens to answer a question

you've asked, that's incidental." -- nobull in comp.lang.perl.misc