Setting up the Gauß system to compute (1 - f)*f*π*Csc[π*f] along the n axis, then heading off instead along the path n=h=k gave a 6 bits/whack matrix with a rather unsightly polynomial for element[[1,2]]. This is of little computational cost unless Mathematica's "simplifier" sees it, whereupon it becomes a mountain of mountainous pFqs. The best π special case I found was π/√3 == MProd[{{((1 + g)*(1 + 3*g)*(2 + 3*g))/(8*(3 + 2*g)*(7 + 6*g)*(11 + 6*g)), (9/40)*(8 + 27*g + 21*g^2)}, {0, 1}}], {g, 0,∞}] But just to make sure n=h=k was the best direction, I specialized f to π/2 and did the "spherical" search. Strangely, it insisted on {h,i,j,k,n} vectors like {6, 0, 0, 5, 7} and {8, 0, 0, 7, 9} instead of (6,0,0,6,6} and {8,0,0,8,8}. Instead of a product like (NHK)(NHK)(NHK)..., this requires NNH(NHK)(NHK)... . Humoring it, I got the matrix {{(-1 + 2 g)^3/(512 g^3), 1/16 (-37 + 42 g)}, {0, 1}} This is Ramanujan's formula (75) in http://mathworld.wolfram.com/PiFormulas.html ! Stranger still, Simplify[FunctionExpand[ReleaseHold[MProd[%, {g, ∞}]]]] 1/Pi + (5*EllipticK[(1/16)*(8 - 3*Sqrt[7])]^2)/(4*Pi^2) - (5*Gamma[1/7]^2*Gamma[2/7]^2*Gamma[4/7]^2)/(64*Sqrt[7]*Pi^4) which, luckily, it seems unable to simplify to 1/Pi, giving us a nice EllipticK identity as a bonus! Using the hint to try a few sporadic preambles to NHKNHK..., I found MProd[{{((f - g)^2*g*(1 + f + g)^2)/ (2*(-1 + f - 2*g)*(3 + 2*g)*(2 + f + 2*g)* (3 + f + 2*g)*(f - 2*(1 + g))), f*(2 + 3*g) + f^2*(2 + 3*g) - g*(5 + 20*g + 21*g^2)}, {0, 1}}, {g,∞}]== -((6 (-2 + f) (-1 + f) (2 + f) (3 + f) (-1 + f (1 + f) (-1 + π Csc[f π])))/(f^2 (1 + f)^2)) I actually thought of a reason someone might prefer this to reciprocating the Taylor expansion of Sin[π f], but I'm too groggy to remember it. And I only now remember that Mittag-Leffler series might provide additional fodder to accelerate. --rwg Soon: the "best" matrices (from this system) for sin πx and π . On Sat, Mar 30, 2013 at 12:07 PM, Bill Gosper <billgosper@gmail.com> wrote:
Using path-invariance, we can, in polynomial vs exponential time, exhaustively search a taxicab-metric "sphere" for the direction of fastest convergence.
I.e., we needn't search over paths, just destinations.
Starting with the matrices i: {{(i + k) (i + n)/((1 + i) (i + j + k + n)), -j k n}, {0, 1}}, j: {{(j + k) (j + n)/((1 + j) (i + j + k + n)), -i k n}, {0, 1}}, k: {((i + k) (j + k)/((1 + k) (i + j + k + n)), i j n}, {0, 1}}, n: {{(i + n) (j + n)/((1 + n) (i + j + k + n)), i j k}, {0, 1}}
which in the {n,k} plane give Gauß's identity 2F1(a,b,c;1)=Gamma Gamma/Gamma/Gamma, and adding the h dimension via Sunday's "cheap trick", h: {{(h (h + i - j))/((h + k) (h + i + n)), -1 + j + k + n}, {0, 1}}}, i: {{((h + i - j) (i + n))/((1 + i - j - k) (h + i + n)), ((-1 + h + k) (-1 + j + k + n))/(-1 - i + j + k)}, {0, 1}}}, j: {{((i - j - k) (j + n))/((-1 + h + i - j) (j + k + n)), ((-1 + h + k) (-1 + h + i + n))/(-1 + h + i - j)}, {0, 1}}}, k: {{(k (-i + j + k))/((h + k) (j + k + n)), -1 + h + i + n}, {0, 1}}}, n: {{((i + n) (j + n))/((h + i + n) (j + k + n)), -1 + h + k}, {0, 1}}}
then searching the neighborhood of starting point n=1,i=0,j=0,h=1,k=1 at a radius of 18 says that "best" is to take 6 n steps, 6 h steps, and 6 k steps, yielding the 6 bits/term identity (combining just one step of n, h, and k) π^2/6==Sum[(13 + 21*k)*π^(3/2)*k!^3/(64^(k + 1)*(1/2 + k)!^3), {k, 0, ∞}] which Mathematica converts to a useless pair of 4F3s. Notice how notationally and computationally inferior are both Sum and pFq notations vs this teensy matrix product In[893]:= {{(2/j + 4)^-3, 21 j/8 - 1}, {0, 1}}
In[894]:= Dot @@ Table[%, {j, 3}]
Out[894]= {{1/2744000, 23687/14400}, {0, 1}}
In[895]:= 23687/14400 - π^2/6.
Out[895]= -3.51129*10^-6 (~3 ppm from 3 terms).
The Sum identity appears to express π^2 in terms of π^(3/2) ! But of course you don't need π to evaluate the summand.
This identity appears in my ancient, pre-matrix, pre-path-invariant AIM-304 FTP: ai-publications/0-499/AIM-304.ps William Gosper, Acceleration of Series, March 1974. 91 pgs. The Ramanujan 1/π identity is there too, but mistyped and undersimplified.
I quoted "best" above because, e.g., we could have combined the n, h, and k steps with a coordinate transformation, yielding fewer steps with messier matrices. Subjectivity persists. --rwg Soon: the "best" matrices (from this system) for csc πx, sin πx, π, and 1/π .