Generating function for residues of a complicated function

I have a rather complicated function involving 3F2 Hypergeometric functions (see below), which has infinitely many poles. I can extract the residues individually. But it would be great if I could write down a function that directly generates all the residues.

Is it possible to construct such a function if one can compute say 100 residues using mathematica?

Here is the function $F(a,b)$ where $a, b$ are positive integers with $a<b$ and $a$ is even. $F(a,b)$ has infinitely many poles for a fixed value of $a=a_0$. E.g, $Res[F(0,b)]_{b=1} = \frac{1}{2}$, $Res[F(0,b)]_{b=4} = \frac{1}{4096}$ and so on.

F[a_, b_] := - (1 + (-1)^a) k[a, b]/2 (m[0, -1/4, a + b] m[0, -1/4, a + 2 - b] + m[1/2, -1/4, a + b] m[1/2, -1/4, a + 2 - b] - 1/Sqrt[2] m[1/2, -1/4, a + b] m[0, -1/4, a + 2 - b] - 1/Sqrt[2] m[0, -1/4, a + b] m[1/2, -1/4,a + 2 - b])


where,

k[a_, b_] := (Gamma[(a + b)/2])^4/(2 Pi^2 Gamma[a + b - 1] Gamma[a + b])

m[p_, q_, r_] := (2^(r - 3) Gamma[q + 2] Gamma[(r + 2 p - 2)/4])/Gamma[(r + 2 p + 4 q + 6)/4] HypergeometricPFQ[{1/2, r/2, (r + 2 p - 2)/4}, {(r + 1)/2, (r + 2 p + 4 q + 6)/4}, 1]


A sample residue at $b=4$ when $a$ held fixed at $~\it{zero}$.

Residue[F[0, b], {b, 4}] // N // Rationalize


The residues come from that Gamma[z], where z takes zero or negative integer values.

Residue[ Gamma[-z] , {z, #}] & /@ Range[-5, 10]

(*     {0, 0, 0, 0, 0, -1, 1, -(1/2), 1/6, -(1/24), 1/120, -(1/
720), 1/5040, -(1/40320), 1/362880, -(1/3628800)}     *)


Build F[a, b] // Together and you there see a lot of Gammas, that can take negative integers: Gamma[(a - b)/4] Gamma[1/4 (8 + a - b)] Gamma[1/4 (-2 + a + b)] and Gamma[1/4 (1 + a - b)] Gamma[1/4 (7 + a - b)] Gamma[1/4 (-2 + a + b)]and so on.

Cut all this Gammas (only neccesary in the Numerator) to get a torso function, which has no residues.

Table[Residue[torso[a, b], {b, i}], {i, 1, 25}]

(*   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0}    *)


Starting from now I regard only the case a=0, you can easily extend the following ideas to other a.

With Expand you can bring all this Gammmas in the form Gamma[r - b/s].

The residues of this Gammas at the b values, where you get Gamma of negative integers, can be written as (-1)^(i + 1) s/Gamma[i + 1]. Here the proof.

Table[{i, Residue[ Gamma[r - b/s], {b, r s + i s}]}, {i, 0, 10}] ==
Table[{i, (-1)^(i + 1) s/Gamma[i + 1]}, {i, 0, 10}]

(*   True   *)


Now substitute all the Gamma[r - b/s] by the above expression and in all the rest torso terms insert the given b value to get the total residue.

(I just have no more time to elaborate exact commands, but with this hints you can do it.)

• Thanks a lot for responding! Actually I couldn't follow the last two steps which, I think, are most crucial ones. Can you please demonstrate one example with a=0 (say), if you have time? Thanks again. – Physics Moron Nov 12 '17 at 10:58
• Also HypergeometricPFQ[..] functions can have poles too for integer values of b when a=0, say. – Physics Moron Nov 12 '17 at 11:17