%I #16 Jun 16 2016 23:27:40
%S 2,-10,46,-334,982,-10942,140986,-425730,7201374,-137366646,410787198,
%T -9473047614,236302407090,-710245778490,20563663645710,
%U -638377099140510,1912749274005030,-67020067316087550,2477305680740159850
%N A sequence related to the Madhava-Gregory-Leibniz formula for Pi.
%C The EG1 matrix is defined in A162005. The first column of this matrix leads to the function PLS(z) = sum(2*eta(2*m-1)*z^(2*m-2), m=1..infinity) = 2*log(2) - Psi(z) - Psi(-z) + Psi(z/2) + Psi(-z/2). The values of this function for z=n+1/2 are related to Pi in a curious way.
%C Gauss's digamma theorem leads to PLS(z=n+1/2) = (-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1). Now we define PLS(z=n+1/2) = a(n)/p(n) with a(n) the sequence given above and for p(n) we choose the esthetically nice p(n) = (2*n-1)!!/(floor((n-2)/3)*2+1)!!, n=>0. For even values of n the limit(a(2*n)/p(2*n), n=infinity) = Pi and for odd values of n the limit(a(2*n+1)/p(2*n+1), n=infinity) = - Pi. We observe that the a(n)/p(n) formulas resemble the partial sums of the Madhava-Gregory-Leibniz series for Pi = 4*(1-1/3+1/5-1/7+ ...), see the examples. The 'extra term' that appears in the a(n)/p(n) formulas, i.e., 2/(2*n+1), speeds up the convergence of abs(a(n)/p(n)) significantly. The first appearance of a digit in the decimal expansion of Pi occurs here for n: 1, 3, 9, 30, 74, 261, 876, 3056, .., cf. A126809. [Comment modified by the author, Oct 09 2009]
%H Frits Beukers, <a href="http://www.nieuwarchief.nl/serie5/pdf/naw5-2000-01-4-372.pdf">A rational approach to Pi</a>, Nieuw Archief voor de Wiskunde, December 2000, pp. 372-379.
%H Peter Borwein, <a href="http://www.nieuwarchief.nl/serie5/pdf/naw5-2000-01-3-254.pdf">The amazing number Pi</a>, Nieuw Archief voor de Wiskunde, September 2000, pp. 254-258.
%H Johannes W. Meijer, <a href="/A166107/a166107.jpg">A modified Madhava-Gregory-Leibniz formula for Pi</a>, Mar 02 2013.
%H Pacific Institute for the Mathematical Sciences, <a href="http://www.pims.math.ca/resources/publications/pi-sky">Pi in the Sky magazine</a>, 2000-2013.
%H Wislawa Szymborska, <a href="http://katherinestange.com/mathweb/p_p2.html">The admirable number Pi</a>, Miracle Fair, 2002.
%H Eric. W. Weisstein, <a href="http://mathworld.wolfram.com/GausssDigammaTheorem.html">Gauss's Digamma Theorem.</a>, from Wolfram MathWorld.
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Madhava_of_Sangamagrama"> Madhava of Sangamagrama</a>.
%F a(n) = p(n)*(-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1) with
%F p(n) = doublefactorial(2*n+1)/doublefactorial(floor((n-1)/3)*2+1) = A220747(n)
%F PLS(z) = 2*log(2) - Psi(z) - Psi(-z) + Psi(z/2) + Psi(-z/2)
%F PLS(z=n+1/2) = a(n)/p(n) = (-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1)
%F PLS(z=2*n+5/2) - PLS(z=2*n+1/2) = 2/(4*n+5) - 4/(4*n+3) + 2/(4*n+1) which leads to:
%F Pi = 2 + 16 * sum(1/((4*n+5)*(4*n+3)*(4*n+1)), n=0 .. infinity).
%F PLS (z=2*n +7/2) - PLS(z=2*n+3/2) = 2/(4*n+7) - 4/(4*n+5) + 2/(4*n+3) which leads to:
%F Pi = 10/3 - 16*sum(1/((4*n+7)*(4*n+5)*(4*n+3)), n=0 .. infinity).
%F The combination of these two formulas leads to:
%F Pi = 8/3 + 48* sum(1/((4*n+7)*(4*n+5)*(4*n+3)*(4*n+1)), n=0 .. infinity).
%e The first few values of a(n)/p(n) are: a(0)/p(0) = 2/1; a(1)/p(1) = - 4*(1) + 2/3 = -10/3; a(2)/p(2) = 4*(1-1/3) + 2/5 = 46/15; a(3)/p(3) = - 4*(1-1/3+1/5) + 2/7 = - 334/105; a(4)/p(4)= 4*(1-1/3+1/5-1/7) + 2/9 = 982/315; a(5)/p(5) = - 4*(1-1/3+1/5-1/7+1/9) + 2/11 = -10942/3465; a(6)/p(6) = 4*(1-1/3+1/5-1/7+1/9-1/11) + 2/13 = 140986/45045; a(7)/p(7) = - 4*(1-1/3+1/5-1/7+1/9-1/11+1/13) + 2/15 = - 425730/135135.
%p A166107 := n -> A220747 (n)*((-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1)): A130823 := n -> floor((n-1)/3)*2+1: A220747 := n -> doublefactorial(2*n+1) / doublefactorial(A130823(n)): seq(A166107(n), n=0..20);
%Y Cf. A162005, A001147, A130823, A025547, A220747, A000796, A157142, A126809, A133766, A133767, A154633.
%K easy,sign
%O 0,1
%A _Johannes W. Meijer_, Oct 06 2009, Feb 26 2013, Mar 02 2013