This notebook contains additional material to the Mathematica GuideBooks  (Springer-Verlag, New York, 2004) http://www.MathematicaGuideBooks.org . It uses the stylesheet of the Mathematica GuideBooks, which is embedded.

Symbolics Volume, Chapter 3

Find an examples of a Gauss hypergeometric function (Subscript[, 2])(Subscript[F, 1])(a,b;c;z) with rational arguments a, b, c, z that has a rational value which Mathematica does not find directly, or by using FunctionExpand or FullSimplify.

abcMaxDenominator = 6;
abcs = Union[Flatten[Table[i/j, {j, abcMaxDenominator}, {i, 0, j}]]];

(* use symmetry in a and b *)
abs = Flatten[Table[{abcs[[i]], abcs[[j]]}, {i, Length[abcs]}, 
                                            {j, i - 1}], 1];
                                            
Length[abc = Flatten[Function[ab, Append[ab, #]& /@ abcs] /@ abs, 1]]

hyps[z_] = Select[Hypergeometric2F1[##, z]& @@@ abc, 
                  MemberQ[#, Hypergeometric2F1, {0, Infinity}, Heads -> True]&] /.
                  Hypergeometric2F1 -> hypergeometric2F1;
                  
Length[hyps[z]]

The function rationalQ find a numerical approximation for ζ and checks if this number is a nice fraction.

rationalQ[ζ_] := 
   (Head[Rationalize[Hypergeometric2F1 @@ N[ζ, 20]]] === Rational) &&
   (* repeat with more digits *)
   (Head[Rationalize[Hypergeometric2F1 @@ N[ζ, 50]]] === Rational)

Now, we use values for z which are proper fractions with a given denominator in hyps[z] and select the ones that are fractions. We increase the denominator value until we find a result. After a few minutes, we find the example (Subscript[, 2])(Subscript[F, 1])(2/3,1/3;5/6;27/32)=8/5.

denominatorNFractions[n_] := Select[Range[n - 1]/n, Denominator[#] == n&]

n = 1;
While[rat2F1s = Flatten[Select[hyps[#], rationalQ]& /@ 
                            denominatorNFractions[n]];
      rat2F1s === {}, n++];    
rat2F1s  /.  hypergeometric2F1 -> Hypergeometric2F1

Rationalize[N[%, 1000]]