####################################################################### ## checkUpsideDown: Save this file as checkUpsideDown. To use it, # ## stay in the same directory, get into Maple # ## (by typing: maple ) and then type: # ## read checkUpsideDown: # # ## Then follow the instructions given there # ## # #######################################################################: print(` `): print(` `): print(`For general help, and a list of the available functions,`): print(` type "ezra();". For specific help type "ezra(procedure_name)" . `): print(): ezra:=proc() if args=NULL then print(` `): print(` checkUpsideDown: `): print(` A Maple package that verifies Theorems 1-4 for given in the article:`): print(`Some Nice Sums are Almost as Nice if you turn them Upside Down`): print(`by Moa Apagodu and Doron Zeilberger `): print(` for nonnegative integers. `): print(` For help with a specific procedure, type ezra(procedure_name); . `): print(`The main procedures are:`): print(` `): print(` check1, check2, check3, check4`): elif nops([args])=1 and op(1,[args])=check1 then print(`check1(n) : given a nonnegative integer n, check1 implements the formula in theorem 1 for numeric n.`): print(`The output is the differrence between the two sides of the formula, and should be zero.`): print(`Try:check1(3);`): print(`{seq(check1(j),j=0..15)} ;`): elif nops([args])=1 and op(1,[args])=check2 then print(`check2(n) : given a nonnegative integer n, check2(n) implements the formula in theorem 2 for numeric n`): print(`The output is the differrence between the two sides of the formula.`): print(`Try:check2(3)`): print(`{seq(check2(j),j=0..15)} ; `): elif nops([args])=1 and op(1,[args])=check3 then print(`check3(n) : given a nonnegative integer n, check3 implements the formula in theorem 3.`): print(`The output is the differrence between the two sides of the formula.`): print(`Try:check3(3);`): print(`{seq(check3(j),j=0..15)} ;`): elif nops([args])=1 and op(1,[args])=check4 then print(`check4(n) : given a nonnegative integer n, check4 implements the formula in theorem 4.`): print(`The output is the differrence between the two sides of the formula.`): print(`Try:check4(3)`): print(`{seq(check4(j),j=0..15)}; `): else print(`There is no ezra for`,args): fi: end: ############################################################################### print(` The theorems are:`): print(` `): print(`Theorem 1:`, Sum(binomial(n,k)^(-2),k=0..n-1) = (n+1)!*(n+1)^2/(n+3/2)!/4^n*Sum((3*j^3+12*j^2+18*j+10)*4^j*(j+3/2)!/ (j+1)^2/(j+2)^3/(j+1)!,j=0..n-1)): print(` `): print(` `): print(`Theorem 2:`,sum( q^(-k*(k-1)/2)*qrf(q,q,k)*qrf(q,q,n-k)/qrf(q,q,n),k=0..n-1)= qrf(q^2,q,n)/qrf(q^2,q^2,n)*sum( qrf(q^2,q^2,i)*(q^(i+1)+q^(3*i+3)+q^(-i*(i-1)/2)+q^(-(i+1)*(i-4)/2)- q^((2+3*i-i^2)/2)-q^(-(i+1)*(i-2)/2)-2*q^(2*i+2))/ (q^(i+1)-1)/qrf(q^2,q,i)/(q^(i+2)-1),i=0..n-1)):: print(` `): print(` `): print(`Theorem 3:`, Sum(binomial(m,k)^(-1)*binomial(a,n-k)^(-1),k=0..m-1) = (a+m-n+1)!*(a+4)!*(m+1)/2/(a+m+3)!/(a-n+2)!* Sum(((n+i+i*n+1)*binomial(a,n)^(-1)+(2*i+a-n+3)*binomial(a,n-i)^(-1))* 2*(a+i+3)!*(a-n+2)!/((a+i-n+1)!*(a+4)!*(i+1))/((i+2)*(a+i-n+2)),i=0..m-1)): print(` `): print(` `): print(`Theorem 4:`, Sum((-1)^k*binomial(n+b,n+k)^(-1)*binomial(n+c,c+k)^(-1)*binomial(b+c,b+k)^(-1),k=0..n-1)= (b+n+1)*(c+n+1)*(b+c+2)!*n!/(b+1)/(c+1)/(b+c+n+2)!* Sum(((-1)^i*(b*c+3*b*i+3*b+3*i*c+5*i^2+12*i+3*c+7)*binomial(i+b,2*i)^(-1)*binomial(b+c,b+i)^(-1) - (b*i*c+b*i+i*c+b*c+b+c+i+1)*binomial(i+b,i)^(-1)*binomial(i+c,c)^(-1)*binomial(b+c,b)^(-1))* (b+c+i+2)!*(c+1)*(b+1)/((2*i+2)*(c+i+2)*(b+i+2)*i!*(c+i+1)*(b+i+1)*(c+b+2)!),i=0..n-1)): ############################################################################### ########################################################### #qrf(a,q,k): returns the expanded form of q-rising factorial qrf:=proc(a,q,k) local j: if k=0 then 1 elif type(k,posint) then product('1-a*q^j','j'=0..k-1) elif type(k,negint) then product('(1-a*q^(-j))^(-1)','j'=1..-k) else RETURN('procname(args)') fi end: check1:=proc(n) option remember: local LHS, RHS,k,j: LHS:=sum(binomial(n,k)^(-2),k=0..n-1): RHS:=(n+1)!*(n+1)^2/(n+3/2)!/4^n*sum((3*j^3+12*j^2+18*j+10)*4^j*(j+3/2)!/ (j+1)^2/(j+2)^3/(j+1)!,j=0..n-1): normal(simplify(RHS)): normal(simplify(RHS -LHS)): end: check2:=proc(n) option remember: local LHS, RHS,k,j: LHS:=sum( q^(-k*(k-1)/2)*qrf(q,q,k)*qrf(q,q,n-k)/qrf(q,q,n),k=0..n-1): RHS:=qrf(q^2,q,n)/qrf(q^2,q^2,n)*sum( qrf(q^2,q^2,i)*(q^(i+1)+q^(3*i+3)+q^(-i*(i-1)/2)+q^(-(i+1)*(i-4)/2)- q^((2+3*i-i^2)/2)-q^(-(i+1)*(i-2)/2)-2*q^(2*i+2))/ (q^(i+1)-1)/qrf(q^2,q,i)/(q^(i+2)-1),i=0..n-1): normal(simplify(RHS-LHS)): end: check3:=proc(m) option remember: local LHS, RHS,k,i: LHS:=sum(binomial(m,k)^(-1)*binomial(a,n-k)^(-1),k=0..m-1): LHS:=(simplify(convert(LHS,factorial))): RHS:=(a+m-n+1)!*(a+4)!*(m+1)/2/(a+m+3)!/(a-n+2)!* sum(((n+i+i*n+1)*binomial(a,n)^(-1)+(2*i+a-n+3)*binomial(a,n-i)^(-1))* 2*(a+i+3)!*(a-n+2)!/((a+i-n+1)!*(a+4)!*(i+1))/((i+2)*(a+i-n+2)),i=0..m-1): RHS:=(simplify(convert(RHS,factorial))): normal(simplify(RHS-LHS)): end: check4:=proc(n) option remember: local LHS, RHS,k,i: LHS:=sum((-1)^k*binomial(n+b,n+k)^(-1)*binomial(n+c,c+k)^(-1)*binomial(b+c,b+k)^(-1),k=0..n-1): LHS:=normal(simplify(convert(LHS,factorial))): RHS:=(b+n+1)*(c+n+1)*(b+c+2)!*n!/(b+1)/(c+1)/(b+c+n+2)! * sum(((-1)^i*(3*b*i+3*c*i+b*c+3*b+5*i^2+12*i+3*c+7)*binomial(i+b,2*i)^(-1)*binomial(b+c,b+i)^(-1) - (b*c*i+b*i+c*i+b*c+i+b+c+1)*binomial(i+b,i)^(-1)*binomial(i+c,c)^(-1)*binomial(b+c,b)^(-1))* (b+c+i+2)!*(c+1)*(b+1)/((2*i+2)*(c+i+2)*(b+i+2)*i!*(c+i+1)*(b+i+1)*(c+b+2)!),i=0..n-1): normal(simplify(RHS-LHS)): end: