Expansion of hypergeometric function with symbolic parameters

I just tried in Mathematica 11.3

SeriesCoefficient[Hypergeometric2F1[1, 1 - n, 2 + n, w], {w, 0, m}, Assumptions -> n > m > 1 && n \[Element] Integers]


which gives $$\frac{(n+1)! (m-n)!}{(-n)! (m+n+1)!}$$

This cannot be correct, since $$m-n<0$$ and its factorial is infinity. Is there any walkaround for this problem?

• You have negative factorials in the numerator and denominator, so the ratio is regular and equal to $\frac{(-1)^m (n-1)! (n+1)!}{(n-m-1)! (n+m+1)!}$ for $n > m > 1$ and $n$,$m$ integers. – QuantumDot Jan 13 at 15:25

I'd say it was a bug. Here's a better expression:

FunctionExpand@
SeriesCoefficient[Hypergeometric2F1[1, 1 - n, 2 + n, w], {w, 0, m},
Assumptions -> n > m > 1 && n ∈ Integers] //. {Gamma[a_]/
Gamma[b_] :> Pochhammer[b, a - b]}
(*  Pochhammer[1 - n, m] Pochhammer[2 + m + n, -m]  *)


Here is another approach. First, use the Pfaff transformation on your expression:

f = Hypergeometric2F1[1, 1 - n, 2 + n, w] /.
Hypergeometric2F1[a_, b_, c_, z_] :> (1 - z)^(c - a - b) Hypergeometric2F1[c - a, c - b, c, z];


You can then apply SeriesCoefficient[]:

Assuming[m >= 0, SeriesCoefficient[f, {w, 0, m}]]
(Gamma[m - 2 n] HypergeometricPFQ[{-m, 1 + n, 1 + 2 n}, {2 + n, 1 - m + 2 n}, 1])/
(Gamma[1 + m] Gamma[-2 n])


Altho a $${}_3 F_2$$ function has appeared, this is in a form where the Saalschütz formula can be applied:

% /. HypergeometricPFQ[{a_, b_, c_}, {d_, e_}, 1] :>
Pochhammer[d - b, -a] Pochhammer[d - c, -a]/(Pochhammer[d, -a] Pochhammer[d - b - c, -a])
(Gamma[m - 2 n] Pochhammer[1, m] Pochhammer[1 - n, m])/
(Gamma[1 + m] Gamma[-2 n] Pochhammer[-2 n, m] Pochhammer[2 + n, m])

FullSimplify[%]
(Gamma[1 + m - n] Gamma[2 + n])/(Gamma[1 - n] Gamma[2 + m + n])


which is equivalent to the expression Michael obtained, but can also be rewritten as Pochhammer[1 - n, m]/Pochhammer[n + 2, m]. Note that this is consistent with the choice of parameters in the original hypergeometric function, since we have the identity SeriesCoefficient[Hypergeometric2F1[a, b, c, w], {w, 0, m}] == (Pochhammer[a, m] Pochhammer[b, m])/(m! Pochhammer[c, m]).