Hi all, So I have been trying rather unsuccessfully to implement the Arithmetic-geometric mean/Calculate Pi problem in the Wolfram Language, and I have been getting some rather disappointing and confusing results. Firstly, after studying the literature, it would seem to me that the method required by the Rosetta Code challenge is as follows, Where a[n] is the arithmetic mean of a[n-1] and b[n-1], while b[n] is the geometric mean of a[n-1] and b[n-1]. But the problem is that I cannot find this exact formula anywhere else on the internet, and not even in the paper (pdf) that the Rosetta page references. Regardless, my implementation in the Wolfram language follows, piCalc[n_]:=(4*(a[n])^2)/(1-Sum[(2^(k+1))*((a[k])^2-(b[k])^2),{k,1,n}]) a[h_]:=Mean[{a[h-1],b[h-1]}] b[l_]:=GeometricMean[{a[l-1],b[l-1]}] a[1]=Sqrt[2]; b[1]=1; I have been unable to find what initial conditions for a and b will give Pi. I chose Sqrt[2] and 1 here because those are what is used in one of the papers mentioned below that use a similar algorithm, but not only do these number result in a negative result, it is nowhere near Pi. Now there is some ambiguity from what I have seen concerning what a1] and what b[1] should be, as the Rosetta Code page makes no mention of these values, and I cannot determine from the other languages presentations what the other implementations use. I found another paper, [here, which makes mention of using simply the arithmetic and geometric mean formulas, to calculate Pi with the initial conditions, a2]=1/2, and a[2]=1/4, which doesn't make sense to me, but also makes Mathematica reach its recursion limit. Additionally, the [Wikipedia page appears to have an error on their page with respect to how c[n] is defined, as well as not providing initial conditions. Another site also makes mention of using the AGM to calculate Pi, and while it includes the exact formulation for Pi, it doesn't include the formula listed on the Rosetta Code site. It also mentions some of the other formulas I have seen, which seem both simpler than the Rosetta code's formulation, as well as quicker (though I believe in one or multiple of the papers it is proven that they converge quadratically). I am wondering if anyone here knows if there is anything wrong with my code, or if the formula from the Rosetta Code page is incorrect, or even if anyone know what initial conditions I should use for this, any help would be much appreciated. Thanks, Ian Attachments: wolframarithmeti...nb