Re: Computing PI  a simple programming problem Message #20 Posted by Gerson W. Barbosa on 16 Oct 2006, 8:37 p.m., in response to message #19 by Namir
Quote:
Pi = { K1/K2 * [ 1 + sum((1)^i / (1 + 2i)^11) ]} ^(1/11) for i = 1,2,3,..., n
You're right!
As I mentioned earlier, the table below demonstrates that fewer correct digits are obtained as the number of terms increases. The equation is in the HP200LX Solver format. As you can see, the series is as slowly convergent as the GregoryLeibniz series, despite the first three iterations giving twelve correct digits. That's why I said I had a nifty algorithm to better solve the first decimals. The first few decimals I meant :)
P=(K1/K2*(1+SIGMA(I,1,N,1,(1)^I/(2*I+1)^E)))^(1/E)
K1 = 14863564800
K2 = 50521
E = 11
N = 1 => P = 3.141592647876891
N = 2 => P = 3.141592653725998
N = 3 => P = 3.141592653581560
N = 4 => P = 3.141592653590661
N = 5 => P = 3.141592653589660
N = 6 => P = 3.141592653589820
N = 7 => P = 3.141592653589787
N = 8 => P = 3.141592653589795
N = 9 => P = 3.141592653589793
Anyway, these series are interesting as they can be expressed in terms of the Dirichlet Beta Function:
1  1/3^{n} + 1/5^{n}  1/7^{n} + ... = Beta(n); n = 1, 3, 5...
Gerson.

I've just found this site:
http://home.att.net/~numericana/answer/analysis.htm
There we can read
Quote:
...
Every other time, such an integration gives an exact expression for the alternating sum of some new power of the reciprocals of odd integers.
...
which explains it all...
Edited: 16 Oct 2006, 10:28 p.m.
