Module: sage.combinat.expnums
Compute Bell and Uppuluri-Carpenter numbers.
Author: Nick Alexander
Module-level Functions
) |
) |
Compute the first
exponential numbers around
, starting
with the zero-th.
Input:
ALGORITHM: We use the same integer addition algorithm as GAP.
This is an extension of Bell's triangle to the general case of
exponential numbers. The recursion performs
additions,
but the running time is dominated by the cost of the last integer
addition, because the growth of the integer results of partial
computations is exponential in
. The algorithm stores
integers, but each is exponential in
.
sage: expnums(10, 1) [1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147]
sage: expnums(10, -1) [1, -1, 0, 1, 1, -2, -9, -9, 50, 267]
sage: expnums(1, 1) [1] sage: expnums(0, 1) [] sage: expnums(-1, 0) []
Author: Nick Alexander
) |
A vanilla python (but compiled via pyrex) implementation of expnums.
We Compute the first
exponential numbers around
, starting
with the zero-th.
sage: from sage.combinat.expnums import expnums2 sage: expnums2(10, 1) [1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147]
) |
) |
See About this document... for information on suggesting changes.