Mon Mar 1 16:33:08 MST 1999 aquarius% maple |\^/| Maple V Release 5.1 (WMI Campus Wide License) ._|\| |/|_. Copyright (c) 1981-1998 by Waterloo Maple Inc. All rights \ MAPLE / reserved. Maple and Maple V are registered trademarks of <____ ____> Waterloo Maple Inc. | Type ? for help. # ----------[ M a p l e ]---------- #interface(echo = 3); # ---------- Initialization ---------- > readlib(showtime): > on; # ---------- Combinatorial Theory ---------- # Pochhammer symbol (a)_n = a (a + 1) ... (a + n - 1) => a (a + 1) (a + 2) O1 := pochhammer(a, 3); pochhammer(a, 3) time = 0.02, bytes = 41946 O2 := simplify(%); a (a + 1) (a + 2) time = 0.06, bytes = 87558 # Binomial coefficient => n (n - 1) (n - 2)/6 O3 := binomial(n, 3); binomial(n, 3) time = 0.02, bytes = 12922 O4 := simplify(convert(%, factorial)); 1/6 (n - 2) (n - 1) n time = 0.03, bytes = 32678 O5 := sumtools[simpcomb](binomial(n, 3)); 1/6 (n - 2) (n - 1) n time = 0.04, bytes = 41834 # 2^n n! (2 n - 1)!! => (2 n)! #2^n * n! * (2*n - 1)!!; # 2^n n! product(2 k - 1, k = 1..n) => (2 n)! O6 := 2^n * n! * product(2*k - 1, k = 1..n); n (n + 1) 2 n! 2 GAMMA(n + 1/2) 1/2 ----------------------------- 1/2 Pi time = 0.05, bytes = 77258 O7 := simplify(%); bytes used=1000308, alloc=786288, time=0.63 GAMMA(2 n + 1) time = 0.34, bytes = 528290 # => (2 n)!/[2^(2 n) (n!)^2] or (2 n - 1)!!/[2^n n!] O8 := GAMMA(n + 1/2)/(sqrt(Pi) * n!); GAMMA(n + 1/2) -------------- 1/2 Pi n! time = 0.01, bytes = 8726 O9 := simplify(%); GAMMA(n + 1/2) ------------------ 1/2 Pi GAMMA(n + 1) time = 0.07, bytes = 75810 # Partitions of an integer => {1+1+1+1, 1+1+2, 1+3, 2+2, 4} (5 in all) O10 := combinat[partition](4); [[1, 1, 1, 1], [1, 1, 2], [2, 2], [1, 3], [4]] time = 0.02, bytes = 21458 O11 := combinat[numbpart](4); 5 time = 0.00, bytes = 7334 # Stirling numbers of the first kind: S_1(5, 2) => -50 O12 := combinat[stirling1](5, 2); -50 time = 0.01, bytes = 12766 # Euler's totient function => 576 O13 := numtheory[phi](1776); 576 time = 0.05, bytes = 53606 # ---------- Quit ---------- O14 := quit bytes used=1240420, alloc=851812, time=0.82 real 1.49 user 0.92 sys 0.59