Mon Feb 16 11:19:30 MST 1998 aquarius% mupad *----* MuPAD 1.4.0 -- Multi Processing Algebra Data Tool /| /| *----* | Copyright (c) 1997 - 98 by SciFace Software GmbH | *--|-* All rights reserved. |/ |/ *----* Licensed to: Michael Wester >> # ----------[ M u P A D ]---------- # >> # ---------- Initialization ---------- # >> TEXTWIDTH:= 80: >> read("../../Time.mupad"): >> # ---------- Combinatorial Theory ---------- # >> # Pochhammer symbol (a)_n = a (a + 1) ... (a + n - 1) => a (a + 1) (a + 2) # >> #pochhammer(a, 3);# >> # Binomial coefficient => n (n - 1) (n - 2)/6 # >> binomial(n, 3); binomial(n, 3) Time: 180 msec Type: "binomial" >> rewrite(%, fact); binomial(n, 3) Time: 730 msec Type: "binomial" >> # 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)! # >> 2^n * n! * product(2*k - 1, k = 1..n); n n + 1 fact(n) 2 2 gamma(n + 1/2) -------------------------------- 1/2 2 PI Time: 480 msec Type: "_mult" >> rewrite(simplify(%), fact); 2 n + 1 fact(n) 2 fact(n - 1/2) ------------------------------ 1/2 2 PI Time: 8350 msec Type: "_mult" >> # => (2 n)!/[2^(2 n) (n!)^2] or (2 n - 1)!!/[2^n n!] # >> gamma(n + 1/2)/(sqrt(PI) * n!); gamma(n + 1/2) -------------- 1/2 PI fact(n) Time: 220 msec Type: "_mult" >> rewrite(%, gamma); gamma(n + 1/2) ------------------ 1/2 PI gamma(n + 1) Time: 150 msec Type: "_mult" >> # Partitions of an integer => {1+1+1+1, 1+1+2, 1+3, 2+2, 4} (5 in all) # >> 4; 4 Time: 150 msec Type: DOM_INT >> # Stirling numbers of the first kind: S_1(5, 2) => -50 # >> #stirling1(5, 2);# >> # Euler's totient function => 576 # >> phi(1776); 576 Time: 160 msec Type: DOM_INT >> # ---------- Quit ---------- # >> quit real 14.22 user 12.69 sys 0.68