# Gauss Continued Fraction for Hypergeometric Functions

I would like to calculate the Gauss Continued Fraction for this particular Hypergeometric function: $$_{2}F_{1}\left( 1-\frac{1}{p}, \frac{1}{p}; 1+\frac{1}{p}; x^p \right)$$ since it satisfies the transformation: $$\frac{_{2}F_{1}\left(a+1, b; c+1; z \right)}{_{2}F_{1}\left(a, b; c; z \right)}=\frac{1}{1+\frac{\frac{(a-c)b}{c(c+1)}z}{1+\cdots}}$$ for $b=c=-a=1/p$ and $z=x^p, p>1$. My target is to see whether I could get a good approximation for this function by using this transformation.

I have tried to find a build-in function in Mathematica to calculate this continued fraction, but it was not possible.

I would like to ask if there exists a library where I could possibly find this, or if you could help me write it down on my own.

• there exists a package called HypExp by Maitre, in which an expansion around eps=1/p. Furthermore, there are serveral packages by RISC, which deal with hypergeometric summations. maybe there is something... not sure. – Armin May 4 '17 at 12:01
• [...]expansion around eps=1/p might be possible. – Armin May 4 '17 at 12:03
• MathematicalFunctionData["Hypergeometric2F1", "ContinuedFractionRepresentations"]? – Michael E2 May 5 '17 at 3:17

You can use this code to construct the continued fraction expansion to any given order:

    f[a_,b_,c_,n_Integer]:=Module[{k},
k=Floor[n/2];
Which[n==1,1,
EvenQ[n],-((b+k-1)(c-a+k-1))/((c+2k-2)(c+2k-1)),
OddQ[n], -((a+k)(c-b+k))/((c+2k-1)(c+2k))]]/;n>0;

cfrac[m_]=ContinuedFractionK[f[a,b,c,n]z^(n-1),1,{n,1,m+1}];


Give it a try. Just type, for example, "cfrac[4]". I haven't checked convergence properties for your case of interest.

• Seems pretty good, thank you! I will try to check whether convergence holds. – Mitscaype May 11 '17 at 8:34