I want to evaluate accurately $f_n(x)={}_2F_1(-n, 1-x; 2; 2)$, where ${}_2F_1$ is the Gauss hypergeometric function. I am interested in the case with $x\in(0,2)$ and $n$ a natural number as large as possible. Fixed $n$, if one expands $f_n(x)$, it seems to consist of only positive coefficients (I don't know how to prove this), whose sum is equal to 1. However, I have tried myself a number of implementations and all of them are unstable for even rather small values of $n$. On the other hand, the existing comercial packages are not of much help either. For instance, in Matlab,
hypergeom([-400, 1 - 1.9], 2, 2)
returns -1.476649544606420e+10
and, in Mathematica,
Hypergeometric2F1[-400, 1 - 1.9, 2, 2]
returns 1.25542*10^58
Any suggestions would be highly appreciated, including how to generate them, etc. Thanks in advance.
Using the information in OEIS sequence A008309 I found that $$ {}_2F_1(1-n, 1-x; 2; 2) = \sum_{k=1}^n\sum_{j=k}^n x^{k-1}2^{j-1}{n-1 \choose j-1}S_1(j,k)/j! $$ where $S_1(.,.)$ is the Stirling number of the first kind. If you use the definition of the Hypergeometric function then you get $$ {}_2F_1(1-n, 1-x; 2; 2) = \sum_{k=0}^n \frac{2^k(1-n)_k (1-x)_k}{k! (k+1)!} $$ where $(.)_k$ is the Pochhammer symbol and $\,n>0.\,$ With any sum of numbers not all the same sign you may have to be careful about possible loss of significance. For $\,0<x<2\,$ the signs in the sum alternate with the maximum absolute value ocurring at around $\, k = 2/3n.\,$ If $\,n\,$ is large then you need to use enough precision to account for loss of significance.
For more practical advice I suggest reading DLMF Hypergeometric function 15.19 "Computation".