7

Given the function,

gg4[ q_, k_] := Sum[((-1)^(n + m)*Binomial[q, n]*Binomial[q, m]*Gamma[n + q]*
  Gamma[m + q])/((-1 - 2*k + n + m + 2*q)*Gamma[-k + n + q]*
  Gamma[-k + m + q]), {n, 0, q}, {m, 0, q}, 
  Assumptions -> q ∈ Integers && k ∈ Integers && q > k >= 0]

Mathematica 10.0.2.0 under Windows 8.1 (64 bit) takes about 20 minutes to evaluate

f = gg4[q, 1]

yielding

(* -(((-2 + q) (-1 + q) Gamma[-3 + 2 q] Pochhammer[1, q]^2)/
     (Gamma[1 + q] Gamma[-2 + 3 q])) *)

which is incorrect, as can be seen from comparing

Table[f /. q -> i, {i, 2, 6}]
(* {0, -(1/30), -(1/105), -(1/462), -(4/9009)} *)

with

Table[gg4[q, 1], {q, 2, 6}]
(* {2/15, 2/315, 2/5005, 4/153153, 5/2909907} *)

This issue is reproducible and also occurs for Mathematica 9.0.1.0. Suggestions?

Addendum - I also tried to compute the Sum above with GenerateConditions -> True but aborted the calculation after nine hours. No answer is better than a wrong answer, I suppose.

bbgodfrey
  • 61,439
  • 17
  • 89
  • 156

1 Answers1

10

I have had the same troubles. When Sum returns an expression containing Pochhammer, it's very often wrong. However, I never experienced this problem with FindSequenceFunction:

Table[gg4[q, 1], {q, 2, 6}]
(*{2/15, 2/315, 2/5005, 4/153153, 5/2909907}*)

gg4k1[q_] = FullSimplify[FindSequenceFunction[Table[gg4[q, 1], {q, 2, 11}], q - 1]]
(*(2^(5 - 4 q) Sqrt[\[Pi]] (-1 + q)^2 q Gamma[-3 + 2 q])/Gamma[-(1/2) + 2 q]*)

Table[gg4k1[q], {q, 2, 6}]
(*{2/15, 2/315, 2/5005, 4/153153, 5/2909907}*)

Using some more FindSequenceFunction the solution turns out to be:

gg4[q_, k_] = (2 k - 1)!! 2^(2 + 3 k - 4 q) Sqrt[\[Pi]] *
                Product[(q - i)^2, {i, k}] q Gamma[2 (q - k) - 1]/Gamma[1/2 - k + 2 q];

To obtain the expression above, I did the same for further k values:

gg4k2[q_] = FullSimplify[FindSequenceFunction[Table[gg4[q, 2], {q, 3, 12}], q - 2]]
gg4k3[q_] = FullSimplify[FindSequenceFunction[Table[gg4[q, 3], {q, 4, 13}], q - 3]]
...

Comparing the almost similar outputs for k from 1 to 6, you'll see only a few thing changes (some linear translations in the gamma/power argument wrt. k, the product and the constant factor). Only the constant factor wasn't immediately clear (1, 3, 15, 105, 945, 10395). However, using again FindSequenceFunction[{1, 3, 15, 105, 945, 10395}], youll have (2 # - 1)!!

Coolwater
  • 20,257
  • 3
  • 35
  • 64