Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Stirling1 Calculator

Stirling1

Function: stirling1 (<n>, <m>) Represents the Stirling number of the first kind.

declare (n, integer);
 assume (n >= 0);
 stirling1 (n, n);
 stirling1 (sqrt(2), sqrt(2));
 declare (n, integer);
 assume (n >= 0);
 stirling1 (n + 1, n);
 stirling1 (n + 1, 1);

When <n> and <m> are nonnegative integers, the magnitude of stirling1 (<n>, <m>) is the number of permutations of a set with <n> members that have <m> cycles. For details, see Graham, Knuth and Patashnik Concrete Mathematics. Maxima uses a recursion relation to define stirling1 (<n>, <m>) for <m> less than 0; it is undefined for <n> less than 0 and for non-integer arguments.

stirling1 is a simplifying function. Maxima knows the following identities.

1. stirling1(0, n) = kron_delta(0, n) (Ref. [1])

2. stirling1(n, n) = 1 (Ref. [1])

3. stirling1(n, n - 1) = binomial(n, 2) (Ref. [1])

4. stirling1(n + 1, 0) = 0 (Ref. [1])

5. stirling1(n + 1, 1) = n! (Ref. [1])

6. stirling1(n + 1, 2) = 2^n - 1 (Ref. [1])

These identities are applied when the arguments are literal integers or symbols declared as integers, and the first argument is nonnegative. stirling1 does not simplify for non-integer arguments.

References:

[1] Donald Knuth, The Art of Computer Programming, third edition, Volume 1, Section 1.2.6, Equations 48, 49, and 50.

Examples:

          (%i1) declare (n, integer)$
          (%i2) assume (n >= 0)$
          (%i3) stirling1 (n, n);
          (%o3)                           1

stirling1 does not simplify for non-integer arguments.

          (%i1) stirling1 (sqrt(2), sqrt(2));
          (%o1)              stirling1(sqrt(2), sqrt(2))

Maxima applies identities to stirling1.

          (%i1) declare (n, integer)$
          (%i2) assume (n >= 0)$
          (%i3) stirling1 (n + 1, n);
                                      n (n + 1)
          (%o3)                       ---------
                                          2
          (%i4) stirling1 (n + 1, 1);
          (%o4)                          n!

(%o1)                                true
(%i2) 

Stirling1 Example

Related Examples

stirling1

? stirling1;

Calculate

stirling1

stirling1(10,3);

Calculate

stirling1

stirling1(1,3);

Calculate

stirling1

? stirling1;

Calculate

stirling1

stirling1(10,3);

Calculate

stirling1

stirling1(1,3);

Calculate