(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 74635, 2299]*) (*NotebookOutlinePosition[ 75596, 2332]*) (* CellTagsIndexPosition[ 75552, 2328]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ StyleBox["\[Pi]", FontFamily->"Helvetica", FontSize->24, FontWeight->"Bold", FontSlant->"Plain", FontTracking->"Plain", PrivateFontOptions->{"FontPostScriptName"->Automatic}], StyleBox[": A 2000-Year Search Changes Direction", FontSize->23], " " }], "Title", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, PageBreakBelow->Automatic, TextAlignment->Center, AspectRatioFixed->True, FontWeight->"Bold"], Cell[TextData[{ StyleBox[ "Victor Adamchik\n Wolfram Research, Inc. \n100 Trade Center Dr., \ Champaign, IL 61820\nvictor@wolfram.com", FontSize->14, FontWeight->"Plain"], StyleBox["\n", FontSize->14], StyleBox["&", FontSize->14, FontWeight->"Plain"], StyleBox["\n", FontSize->14], StyleBox[ "Stan Wagon\n Macalester College\n St. Paul, MN 55105\nwagon@macalstr.edu", FontSize->14, FontWeight->"Plain"] }], "Text", TextAlignment->Center, FontFamily->"Helvetica", FontSize->11, FontSlant->"Italic"], Cell[CellGroupData[{ Cell["Introduction", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, PageBreakWithin->Automatic, PageBreakBelow->Automatic, AspectRatioFixed->True], Cell[TextData[ "One of the charms of mathematics is that it is possible to make elementary \ discoveries about objects that have been studied for millenia. A most \ striking example occurred recently when David Bailey of NASA/Ames and Peter \ Borwein and Simon Plouffe of the Centre for Experimental and Computational \ Mathematics at Simon Fraser University (henceforth, BBP) discovered a \ remarkable, and remarkably simple new formula for \[Pi]. Here is their \ formula:"], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Pi] = \[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/16\^k\) \((4\/\(8 k + 1\) - 2\/\(8 k + 4\) - 1\/\(8 k + 5\) - 1\/\(8 k + 6\))\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell[TextData[{ "The formula is not too hard to prove, but that misses the point: Finding \ it in the first place is what took some effort. BBP report that the formula\ \[AGrave]s discovery was \"a combination of inspired guessing and extensive \ searching using the PSLQ integer relation algorithm\". The PSLQ algorithm is \ a method for recognizing whether a constant is a combination of other, more \ fundamental, constants (it has been implemented in ", StyleBox["Mathematica", FontSlant->"Italic"], " by Richard Crandall [Cra]). The discoverers sought such a formula because \ they were aware that it could be used to compute the nth digit of \[Pi] (in \ base 16), without computing any prior digits. This goes completely against \ conventional wisdom, and totally eliminates high-precision requirements from \ a computation of, say, the billionth hexadecimal digit! The big question now \ is whether such a method exists for the base-10 digits of \[Pi]. For a fuller \ treatment, including several results about other constants and open \ questions, see [BBP], which can be fetched from Peter Borwein's web site \ (http://www.cecm.sfu.ca/~pborwein)." }], "Text"], Cell[TextData[{ "In this paper we will discuss the BBP formula and show how ", StyleBox["Mathematica", FontSlant->"Italic"], " can be used to generate many other formulas of the same sort. Moreover, \ the ", StyleBox["Mathematica", FontSlant->"Italic"], "-based methods are symbolic, and so a proof of the formula is a natural \ consequence of the discovery." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell[TextData["1. A Proof of the New Formula for \[Pi]"], "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, PageBreakWithin->Automatic, PageBreakBelow->Automatic, AspectRatioFixed->True], Cell["\<\ To prove the BBP formula we analyze separately the general form of \ the four summands. First observe that :\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`\[Sum]\+\(k = 0\)\%\[Infinity] 1\/\(16\^k\ \((8 k + i)\)\) = \(2\^\(i/2\)\ \(\[Sum]\+\(k = 0\)\%\[Infinity]\[Integral]\_0 \%\(1\/\@2\)\(z\^\(i + 8 k - 1\)\) \[DifferentialD]z\) = \(2\^\(i/2\)\ \(\[Integral]\_0 \%\(1\/\@2\)\(( \[Sum]\+\(k = 0\)\%\[Infinity] z\^\(i + 8 k - 1\))\) \[DifferentialD]z\) = 2\^\(i/2\)\ \(\[Integral]\_0\%\(1\/\@2\)\(z\^\(i - 1\)\/\(1 - z\^8\)\) \[DifferentialD]z\)\)\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell["\<\ We can now evaluate the full formula, first introducing the new \ function:\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`g[i_]\ := \ 2\^\(i\/2\)\ \(\[Integral]\_0 \%\(1\/\@2\)\(( \[Sum]\+\(k = 0\)\%\[Infinity]\ z\^\(8 k + i - 1\)) \)\[ThinSpace]\[DifferentialD]z\)\)], "Input"], Cell["Then the BBP formula could be proved in one line:", "Text"], Cell[CellGroupData[{ Cell["Simplify[4 g[1] - 2 g[4] - g[5] - g[6]]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`\[Pi]\)], "Output"] }, Open ]], Cell[TextData[ "This sort of series for \[Pi] did not arise out of the blue. Of course, \ there is the famous Leibniz series,"], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Pi] = 4\ \(\[Sum]\+\(k = 0\)\%\[Infinity]\((\(-1\))\)\^k\/\(2 k + 1\)\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell[TextData[{ "but that uses powers of -1, not a useful base. There are, however, other \ well-known series having the same general form, that is, sums of series, each \ one of which has as general term a reciprocal of an integer power times a \ rational number over a linear function. Here are four such that are easy to \ derive. We call these ", StyleBox["one-term", FontSlant->"Italic"], " series since each involves only one linear term; the BBP \[Pi]-series is \ a 4-term series." }], "Text"], Cell[BoxData[ \(TraditionalForm \`log(2)\ = \ \(\[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/2\^k\) 1\/k\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(log(2)\)\ = 2\/3\ \(\[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/9\^k\) 1\/\(2 k + 1\)\)\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`log(3)\ = \(\[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/4\^k\) 1\/\(2 k + 1\)\ \ \ \ \ \ \ \ \ \(log(\ 9\/10)\)\ = \ \(-\(\[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/10\^k\) \[Null] 1\/k\)\)\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell[TextData[{ "The first is simply the Maclaurin series for ", Cell[BoxData[ \(TraditionalForm\`log(1\ + x)\)]], ", at x =", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], ". The fourth, which we mention to show that base -10 formulas do exist, \ is also a Maclaurin expansion; this one was used by BBP to compute the 5, \ 000, 000, 065 th decimal digit of ", Cell[BoxData[ FormBox[ RowBox[{"log", "(", FormBox[\(9\/10\), "TraditionalForm"], ")"}], TraditionalForm]]], " a world record for decimal digits. The other two come from the Gregory \ series - the Maclaurin series for ", Cell[BoxData[ \(TraditionalForm\`\(1 + x\)\/\(1 - x\)\)]], " - with x equal to ", Cell[BoxData[ \(TraditionalForm\`1\/3\)]], " for the ", Cell[BoxData[ \(TraditionalForm\`9\^k\)]], " series and ", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], " for the ", Cell[BoxData[ \(TraditionalForm\`4\^k\)]], " case. We illustrate the log(3) case; the infinite series represented by \ the following output must be log(3) because ", Cell[BoxData[ \(TraditionalForm\`\(1 + x\)\/\(1 - x\)\)]], " is 3 when ", Cell[BoxData[ FormBox[ RowBox[{"x", " ", "=", " ", FormBox[\(1\/2\), "TraditionalForm"]}], TraditionalForm]]], ", and it is clearly the same series as the one for log(3) above." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{\(Normal[Series[Log[\(1 + x\)\/\(1 - x\)], {x, 0, 12}]]\), "/.", RowBox[{"x", "\[Rule]", TagBox[\(1\/2\), HoldForm]}]}]], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ FormBox[ RowBox[{ FractionBox[ RowBox[{"2", " ", SuperscriptBox[ RowBox[{"(", TagBox[\(1\/2\), HoldForm], ")"}], "11"]}], "11"], "+", FractionBox[ RowBox[{"2", " ", SuperscriptBox[ RowBox[{"(", TagBox[\(1\/2\), HoldForm], ")"}], "9"]}], "9"], "+", FractionBox[ RowBox[{"2", " ", SuperscriptBox[ RowBox[{"(", TagBox[\(1\/2\), HoldForm], ")"}], "7"]}], "7"], "+", FractionBox[ RowBox[{"2", " ", SuperscriptBox[ RowBox[{"(", TagBox[\(1\/2\), HoldForm], ")"}], "5"]}], "5"], "+", FractionBox[ RowBox[{"2", " ", SuperscriptBox[ RowBox[{"(", TagBox[\(1\/2\), HoldForm], ")"}], "3"]}], "3"], "+", RowBox[{"2", " ", TagBox[\(1\/2\), HoldForm]}]}], TraditionalForm]], "Output"] }, Open ]], Cell[TextData[ "These series could be used to extract, for example, base-2 digits of log(2) \ or log(3), but these real numbers do not have the cachet that \[Pi] does, and \ apparently no one, prior to BBP, thought of using such a series for digit \ extraction."], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["2. Far-Out Hex Digits", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, PageBreakBelow->Automatic, AspectRatioFixed->True], Cell["\<\ It is a fairly routine matter to use the BBP series to extract some \ far-out hex digits. Consider, for example, the real\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`s\ = \ \[Sum]\+\(k = 0\)\%\[Infinity] 1\/16\^k\ 4\/\(8 k + 1\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell[TextData[{ "The far-out digits (say five digits starting from the dth) arise as the \ fractional part of \n", Cell[BoxData[ \(TraditionalForm\`16\^d\)]], ". s. Multiplying ", Cell[BoxData[ \(TraditionalForm\`16\^d\)]], " into the sum and then splitting it into a sum from 0 to d and a sum from \ d+1 to infinity does the job. The second sum " }], "Text"], Cell[BoxData[ \(TraditionalForm \`s\ = \ \[Sum]\+\(k = d + 1\)\%\[Infinity] Frac[ 1\/16\^\(k - d\)\ 4\/\(8 k + 1\)]\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell["\<\ and it is easy to see that 15 terms of this is more than enough for \ the accuracy required. The first sum is\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`s\ = \ \[Sum]\+\(k = 0\)\%d Frac[1\/16\^\(k - d\)\ 4\/\(8 k + 1\)] \)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell[TextData[{ "and this is computed by reducing the numerator modulo 8k+1. Because we \ want the fractional part, only the residue counts, and that can be divided by \ 8k+1 using floating-point arithmetic. Since modular exponentation is speedy \ via ", StyleBox["PowerMod", "Input", FontFamily->"Courier", FontSize->10], ", high-precision is not required. Of course, in the case of \[Pi], we have \ four such series to consider.\n", StyleBox["\n", FontSize->6], "The ", StyleBox["DigitExtractor", "Input", FontFamily->"Courier", FontSize->10], " code that follows produces five digits for real numbers having \ representations of the type we are considering: it takes as input the base b \ (16 in the BBP case) and the coefficient list ({4, 0,0, -2, -1, -1, 0, 0} in \ the BBP case) and returns the first five base-b digits, starting from the \ dth. The leading 3 of \[Pi] is considered to be the 0th digit. The 15 is \ enough to guarantee that the omitted terms are negligible, at least for the \ numbers that arise in this article. A ", StyleBox["Do", "Input", FontFamily->"Courier", FontSize->10], "-loop is used for ", StyleBox["mainSum", "Input", FontFamily->"Courier", FontSize->10], ", as discussed in the appendix. The use of ", StyleBox["N[coeffs]", "Input", FontFamily->"Courier", FontSize->10], " guarantees that the computation is done with machine precision reals; \ this does limit us, however, because adding the fractional parts of, say, \ 10,000,000 reals each with 16 digits of precision can lead to unacceptable \ roundoff. The code works fine for d up to one million, buit not ten million. \ Serious digit hunters could use, say, 32 digits of precision, but this will \ really slow things down. One can use negative values of b (example in section \ 4). The last line of the code is to add back any leading zeros that ", StyleBox["RealDigits", "Input", FontFamily->"Courier", FontSize->10], " has stripped off. The code is quite short and not optimized for speed. \ The electronic version of this paper contains a twice faster version." }], "Text"], Cell[BoxData[ \(\(DigitExtractor[d_, \ b_, \ coeffs_List]\ := \ Module[{\n\ \ \ \ n\ = \ d\ - \ 1, \ mainSum\ = \ 0, \ s\ = \ Sign[b], \ base\ = \ Abs[b], \n\ \ \ \ nc\ = \ N[coeffs], \n\ \ \ \ \ rd, \ m\ = \ Length[coeffs]}, \n\ \ Do[mainSum\ = \ Mod[mainSum\ + \ s^k\ nc\ .\ Table[If[coeffs[\([i]\)]\ == \ 0, \ 0, \n\ \ \ \ \ \ N[PowerMod[base, \ n\ - \ k, \ \((k m\ + \ i)\)]] \ /\ \((k m\ + \ i)\)], \ {i, \ m}], \ 1], \ \n \ \ \ \ {k, \ 0, \ n}]; \n\ \ rd\ = \ RealDigits[ Mod[mainSum\ + \n\ \ \ \ \ \ \ \ \ Sum[s^k\ *\ nc\ .\ \(( base\ ^\ \((n\ - \ k)\)\ /\ \((k m\ + \ Range[m])\))\), \ \n \ \ \ \ \ \ \ \ \ \ \ \ \ \ {k, \ n\ + \ 1, \ n\ + \ 15}], \ 1], \ base]; \n\ \ Take[Join[Array[0\ &, \ \(-rd[\([2]\)]\)], \ rd[\([1]\)]], \ 5]]\n \)\)], "Input"], Cell[TextData[{ "We check by examining hexadecimal ", Cell[BoxData[ \(TraditionalForm\`\[Pi]\)]], "." }], "Text"], Cell[CellGroupData[{ Cell["DigitExtractor[0, 16, {4, 0, 0, -2, -1, -1, 0, 0}]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`{3, 2, 4, 3, 15}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["BaseForm[N[Pi], 16]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ FormBox[ TagBox[ InterpretationBox[\("3.243f"\_16\), 3.141592653589793, AutoDelete->True], (BaseForm[ #, 16]&)], TraditionalForm]], "Output"] }, Open ]], Cell["\<\ Good. Here are some farther-out digits, and a different approach to \ verification.\ \>", "Text"], Cell[CellGroupData[{ Cell["DigitExtractor[1000, 16, {4, 0, 0, -2, -1, -1, 0, 0}]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`{3, 4, 9, 15, 1}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["% == RealDigits[N[Pi, 1300], 16][[1, Range[1001, 1005]]]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`True\)], "Output"] }, Open ]], Cell["\<\ And finally, we go for the millionth hex digit; this takes about \ six hours on a PowerMac 8100.\ \>", "Text"], Cell[CellGroupData[{ Cell["DigitExtractor[10^6, 16, {4, 0, 0, -2, -1, -1, 0, 0}]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[OutputFormData["\<\ {2, 6, 12, 6, 5}\ \>", "\<\ {2, 6, 12, 6, 5}\ \>"], "Output", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, AspectRatioFixed->True] }, Open ]], Cell[TextData[{ "These digits agree with the ones published in [BBP]. Take a moment and \ think about what has been done here: using ", StyleBox["no", FontSlant->"Italic"], " high-precision arithmetic, but only routine operations on 16-digit \ floating-point numbers, and getting absolutely no information about the early \ digits of \[Pi], we have found the millionth digit of \[Pi]. In fact, \ Rabinowitz and Wagon [RW] had published a \[Pi]-digit algorithm that uses \ only low-precision integer arithmetic, but one had to compute early digits to \ get late ones and the memory requirements went up as farther-out digits were \ sought. Even that was considered somewhat surprising. But if that was \ counterintuitive, the work of Bailey, Borwein, and Plouffe, is totally \ mind-blowing!" }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["3. A General Method for Finding Formulas (and Proofs)", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, PageBreakWithin->Automatic, AspectRatioFixed->True], Cell[BoxData[ \(\(Off[Solve::svars, General::spell1, \ $MaxPrecision::mepr]; \)\)], "Input", InitializationCell->True], Cell[TextData[{ StyleBox["Mathematica`", FontSlant->"Italic"], "s symbolic power allows us to extend the preceding ideas to get many new \ formulas (together with proofs!), of which the BBP formula is a special case. \ Here is one result, where r denotes any real (or complex) number." }], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Pi] = \[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/16\^k\) \((\(4 + 8 r\)\/\(8 k + 1\) - \(8 r\)\/\(8 k + 2\) - \(4 r\)\/\(8 k + 3\) - \(2 + 8 r\)\/\(8 k + 4\) - \(1 + 2 r\)\/\(8 k + 5\) - \(1 + 2 r\)\/\(8 k + 6\) + r\/\(8 k + 7\))\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False], Cell["\<\ Setting r = 0 yields the BBP formula. The proof is identical to the \ proof in section 1.\ \>", "Text"], Cell[CellGroupData[{ Cell["\<\ Simplify[PowerExpand[(4 + 8 r) g[1] - 8 r g[2] - 4 r g[3] - (2 + 8 \ r) g[4] - (1 + 2 r) g[5] - (1 + 2r) g[6] + r g[7]]]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`\[Pi]\)], "Output"] }, Open ]], Cell[TextData[{ "This unenlightening manipulation totally obscures the question of how we \ found this formula. Indeed, that used an interesting combination of symbolic \ methods. First we let ", Cell[BoxData[ \(TraditionalForm\`a\_i\)]], ", i = 1, . . . , 8, denote undefined constants. The first step is to look \ at the abstract expression obtained by using these constants on top of the 8 \ k + i terms in the BBP formula (i running from 1 to 8). It is simplest to use \ the formulation in terms of integrals (", StyleBox["g(i)", FontFamily->"Courier", FontSize->10], ") derived in section 1." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(aVals = Array[a\_#&, 8]; \nrawExpr = aVals.Array[g, 8]\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, PageBreakWithin->Automatic, GroupPageBreakWithin->Automatic, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`\@2\ \(( 1\/16\ \[ImaginaryI]\ \((2 + \@2)\)\ \[Pi] + 1\/16\ \(( \(-\[ImaginaryI]\)\ \@2\ \[Pi] + 2\ \@2\ \(\(tan\^\(-1\)\)(2)\) + 4\ \(\(tan\^\(-1\)\)(1\/\@2)\) + \@2\ \(log(2)\) + \@2\ \(log(5\/2)\) - 2\ \(log(\(-1\) + 1\/\@2)\) + 2\ \(log(1 + 1\/\@2)\))\))\)\ a\_1 + 2\ \((\((1\/8 + \[ImaginaryI]\/8)\)\ \[Pi] + 1\/8\ \(( \(-\[ImaginaryI]\)\ \[Pi] - 2\ \(\(tan\^\(-1\)\)(2)\) + log(3))\))\)\ a\_2 + 2\ \@2\ \(( \(-\(1\/16\)\)\ \[ImaginaryI]\ \((\(-2\) + \@2)\)\ \[Pi] + 1\/16\ \(( \[ImaginaryI]\ \@2\ \[Pi] + 2\ \@2\ \(\(tan\^\(-1\)\)(2)\) - 4\ \(\(tan\^\(-1\)\)(1\/\@2)\) - \@2\ \(log(2)\) - \@2\ \(log(5\/2)\) - 2\ \(log(\(-1\) + 1\/\@2)\) + 2\ \(log(1 + 1\/\@2)\))\))\)\ a\_3 + 4\ \((\(\[ImaginaryI] \[Pi]\)\/8 + 1\/8\ \((\(-\[ImaginaryI]\)\ \[Pi] + log(5\/3))\))\)\ a\_4 + 4\ \@2\ \(( \(-\(1\/16\)\)\ \[ImaginaryI]\ \((\(-2\) + \@2)\)\ \[Pi] + 1\/16\ \(( \[ImaginaryI]\ \@2\ \[Pi] - 2\ \@2\ \(\(tan\^\(-1\)\)(2)\) + 4\ \(\(tan\^\(-1\)\)(1\/\@2)\) - \@2\ \(log(2)\) - \@2\ \(log(5\/2)\) - 2\ \(log(\(-1\) + 1\/\@2)\) + 2\ \(log(1 + 1\/\@2)\))\))\)\ a\_5 + 8\ \((\((\(-\(1\/8\)\) + \[ImaginaryI]\/8)\)\ \[Pi] + 1\/8\ \(( \(-\[ImaginaryI]\)\ \[Pi] + 2\ \(\(tan\^\(-1\)\)(2)\) + log(3))\))\)\ a\_6 + 8\ \@2\ \(( 1\/16\ \[ImaginaryI]\ \((2 + \@2)\)\ \[Pi] + 1\/16\ \(( \(-\[ImaginaryI]\)\ \@2\ \[Pi] - 2\ \@2\ \(\(tan\^\(-1\)\)(2)\) - 4\ \(\(tan\^\(-1\)\)(1\/\@2)\) + \@2\ \(log(2)\) + \@2\ \(log(5\/2)\) - 2\ \(log(\(-1\) + 1\/\@2)\) + 2\ \(log(1 + 1\/\@2)\))\))\)\ a\_7 + 2\ \(log(16\/15)\)\ a\_8\)], "Output"] }, Open ]], Cell["\<\ This looks like a mess. But actually, it is quite beautiful! This \ will be clear after some simplifications. We can automate this latter \ simplification as it follows. \ \>", "Text"], Cell["\<\ LogExpand[expr_] := PowerExpand[expr] /. {Log[n_Integer] :> \ Apply[#2 . Log[#1]&, Transpose[FactorInteger[n]]], Log[v_/;v<0] -> Log[-1] + Log[-v], ArcTan[1/Sqrt[2]] -> Pi/2 - ArcTan[Sqrt[2]]}\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, InitializationCell->True, AspectRatioFixed->True], Cell["We now perform some simplifications on the raw expression.", "Text"], Cell[CellGroupData[{ Cell["\<\ simpler = Together[LogExpand[rawExpr] /. { Log[1 - 1/Sqrt[2]] -> -Log[2]/2 - Log[1 + Sqrt[2]], Log[1 + 1/Sqrt[2]] -> -Log[2]/2 + Log[1 + Sqrt[2]]}]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`1\/8\ \(( 2\ \@2\ \(log(1 + \@2)\)\ a\_1 + \(log(5)\)\ a\_1 - 2\ \@2\ \(\(tan\^\(-1\)\)(\@2)\)\ a\_1 + 2\ \(\(tan\^\(-1\)\)(2)\)\ a\_1 + \@2\ \[Pi] a\_1 + 2\ \(log(3)\)\ a\_2 - 4\ \(\(tan\^\(-1\)\)(2)\)\ a\_2 + 2 \[Pi] a\_2 + 4\ \@2\ \(log(1 + \@2)\)\ a\_3 - 2\ \(log(5)\)\ a\_3 + 4\ \@2\ \(\(tan\^\(-1\)\)(\@2)\)\ a\_3 + 4\ \(\(tan\^\(-1\)\)(2)\)\ a\_3 - 2\ \@2\ \[Pi] a\_3 + 4\ \(log(5)\)\ a\_4 - 4\ \(log(3)\)\ a\_4 + 8\ \@2\ \(log(1 + \@2)\)\ a\_5 - 4\ \(log(5)\)\ a\_5 - 8\ \@2\ \(\(tan\^\(-1\)\)(\@2)\)\ a\_5 - 8\ \(\(tan\^\(-1\)\)(2)\)\ a\_5 + 4\ \@2\ \[Pi] a\_5 + 8\ \(log(3)\)\ a\_6 + 16\ \(\(tan\^\(-1\)\)(2)\)\ a\_6 - 8 \[Pi] a\_6 + 16\ \@2\ \(log(1 + \@2)\)\ a\_7 + 8\ \(log(5)\)\ a\_7 + 16\ \@2\ \(\(tan\^\(-1\)\)(\@2)\)\ a\_7 - 16\ \(\(tan\^\(-1\)\)(2)\)\ a\_7 - 8\ \@2\ \[Pi] a\_7 - 16\ \(log(5)\)\ a\_8 - 16\ \(log(3)\)\ a\_8 + 64\ \(log(2)\)\ a\_8) \)\)], "Output"] }, Open ]], Cell[TextData[{ "Only seven transcendental numbers appear, and also \[Pi]", Cell[BoxData[ \(TraditionalForm\`\@2\)]], ". We can find these by defining a\n", StyleBox["GetTranscentals", FontFamily->"Courier", FontWeight->"Bold"], " function as follows. " }], "Text"], Cell["\<\ GetTranscendentals[expr_] := Union[ Cases[expr, Pi | _ArcTan | _Log, Infinity]]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, InitializationCell->True, AspectRatioFixed->True], Cell[TextData[{ "The vertical bar in the ", StyleBox["Cases", FontFamily->"Courier", FontWeight->"Bold"], " definition is the disjunction operator for patterns; thus the function \ finds all matching expressions to the specified forms at any level. Now we \ can collect on the transcendentals, using the third argument of ", StyleBox["Collect", FontFamily->"Courier", FontWeight->"Bold"], " to map ", StyleBox["Factor", FontFamily->"Courier", FontWeight->"Bold"], ", which simplifies things." }], "Text"], Cell[CellGroupData[{ Cell["transcs = GetTranscendentals[simpler]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`{\[Pi], \(tan\^\(-1\)\)(2), \(tan\^\(-1\)\)(\@2), log(2), log(3), log(5), log(1 + \@2)}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["collected = Collect[simpler, transcs, Factor]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`\(-\(\(\(\(tan\^\(-1\)\)(\@2)\)\ \((a\_1 - 2 a\_3 + 4 a\_5 - 8 a\_7)\)\)\/\(2\ \@2\)\)\) + 1\/4\ \(\(tan\^\(-1\)\)(2)\)\ \((a\_1 - 2 a\_2 + 2 a\_3 - 4 a\_5 + 8 a\_6 - 8 a\_7)\) + \(\(log(1 + \@2)\)\ \((a\_1 + 2 a\_3 + 4 a\_5 + 8 a\_7)\)\)\/\(2\ \@2\) + 1\/8\ \[Pi]\ \((\@2\ a\_1 + 2 a\_2 - 2\ \@2\ a\_3 + 4\ \@2\ a\_5 - 8 a\_6 - 8\ \@2\ a\_7)\) + 1\/8\ \(log(5)\)\ \((a\_1 - 2 a\_3 + 4 a\_4 - 4 a\_5 + 8 a\_7 - 16 a\_8)\) + 1\/4\ \(log(3)\)\ \((a\_2 - 2 a\_4 + 4 a\_6 - 8 a\_8)\) + 8\ \(log(2)\)\ a\_8\)], "Output"] }, Open ]], Cell[TextData[{ "Note the simple form: seven transcendental numbers are multiplied by \ linear combinations of the a", StyleBox["i", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], ". If we can arrange for the multipliers to be, respectively, 0, 1, 0, 0, \ 0, 0, and 0, then the sum will equal \[Pi]. To isolate the desired equations, \ we gather up all the coefficients of the transcendentals, and \[Pi]", Cell[BoxData[ \(TraditionalForm\`\@2\)]], " as well. ", StyleBox["CoefficientList", FontFamily->"Courier", FontWeight->"Bold"], " returns a matrix; the reader might wish to examine the steps in more \ detail, but flattening and deleting the 0s gets us all the a-combinations \ that occur as coefficients." }], "Text"], Cell[CellGroupData[{ Cell["\<\ (system = DeleteCases[Flatten[ CoefficientList[collected, Append[transcs, Sqrt[2]]]], 0]) // TableForm\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, GroupPageBreakWithin->Automatic, AspectRatioFixed->True], Cell[BoxData[ FormBox[ InterpretationBox[GridBox[{ {\(a\_1\/4 + a\_3\/2 + a\_5 + 2 a\_7\)}, {\(a\_1\/8 - a\_3\/4 + a\_4\/2 - a\_5\/2 + a\_7 - 2 a\_8\)}, {\(a\_2\/4 - a\_4\/2 + a\_6 - 2 a\_8\)}, {\(8 a\_8\)}, {\(\(-\(a\_1\/4\)\) + a\_3\/2 - a\_5 + 2 a\_7\)}, {\(a\_1\/4 - a\_2\/2 + a\_3\/2 - a\_5 + 2 a\_6 - 2 a\_7\)}, {\(a\_2\/4 - a\_6\)}, {\(a\_1\/8 - a\_3\/4 + a\_5\/2 - a\_7\)} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ { Plus[ Times[ Rational[ 1, 4], Subscript[ a, 1]], Times[ Rational[ 1, 2], Subscript[ a, 3]], Subscript[ a, 5], Times[ 2, Subscript[ a, 7]]], Plus[ Times[ Rational[ 1, 8], Subscript[ a, 1]], Times[ Rational[ -1, 4], Subscript[ a, 3]], Times[ Rational[ 1, 2], Subscript[ a, 4]], Times[ Rational[ -1, 2], Subscript[ a, 5]], Subscript[ a, 7], Times[ -2, Subscript[ a, 8]]], Plus[ Times[ Rational[ 1, 4], Subscript[ a, 2]], Times[ Rational[ -1, 2], Subscript[ a, 4]], Subscript[ a, 6], Times[ -2, Subscript[ a, 8]]], Times[ 8, Subscript[ a, 8]], Plus[ Times[ Rational[ -1, 4], Subscript[ a, 1]], Times[ Rational[ 1, 2], Subscript[ a, 3]], Times[ -1, Subscript[ a, 5]], Times[ 2, Subscript[ a, 7]]], Plus[ Times[ Rational[ 1, 4], Subscript[ a, 1]], Times[ Rational[ -1, 2], Subscript[ a, 2]], Times[ Rational[ 1, 2], Subscript[ a, 3]], Times[ -1, Subscript[ a, 5]], Times[ 2, Subscript[ a, 6]], Times[ -2, Subscript[ a, 7]]], Plus[ Times[ Rational[ 1, 4], Subscript[ a, 2]], Times[ -1, Subscript[ a, 6]]], Plus[ Times[ Rational[ 1, 8], Subscript[ a, 1]], Times[ Rational[ -1, 4], Subscript[ a, 3]], Times[ Rational[ 1, 2], Subscript[ a, 5]], Times[ -1, Subscript[ a, 7]]]}]], TraditionalForm]], "Output"] }, Open ]], Cell[TextData[{ "The first 6 entries are the logarithmic and arctangent coefficients, the \ next-to-last entry is the coefficient of \[Pi], and the last entry is the \ coefficient of \[Pi]", Cell[BoxData[ \(TraditionalForm\`\@2\)]], ". If we want the entire sum to equal \[Pi], then we want all but the \ seventh entry to be 0, with the seventh, the coefficient of \[Pi]\.1e, being \ 1." }], "Text"], Cell[CellGroupData[{ Cell["Solve[system == {0, 0, 0, 0, 0, 0, 1, 0}]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`{{a\_2 \[Rule] a\_4 + 2, a\_6 \[Rule] a\_4\/4 - 1\/2, a\_1 \[Rule] 2 - a\_4, a\_3 \[Rule] a\_4\/2 + 1, a\_5 \[Rule] a\_4\/4 - 1\/2, a\_7 \[Rule] \(-\(a\_4\/8\)\) - 1\/4, a\_8 \[Rule] 0}}\)], "Output"] }, Open ]], Cell[TextData[{ "This shows that the solution space has dimension 1; we let ", Cell[BoxData[ \(TraditionalForm\`a\_4\)]], " be a free parameter, -2 - 8 r." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(a\_4 = \(-2\) - 8 r; \)\), \(solution = Simplify[aVals /. First[%%]]\)}], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`{8 r + 4, \(-8\)\ r, \(-4\)\ r, \(-2\)\ \((4 r + 1)\), \(-2\)\ r - 1, \(-2\)\ r - 1, r, 0}\)], "Output"] }, Open ]], Cell[TextData[ "This yields the formula for \[Pi] at the beginning of this section. If we \ set r to 0, out pop the BBP coefficients."], "Text"], Cell[CellGroupData[{ Cell["solution /. r -> 0", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`{4, 0, 0, \(-2\), \(-1\), \(-1\), 0, 0}\)], "Output"] }, Open ]], Cell[TextData[ "Another natural choice is r = -1/2; the resulting formula for \[Pi] was also \ known to Bailey, Borwein, and Plouffe."], "Text"], Cell[CellGroupData[{ Cell["solution /. r -> -1/2", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`{0, 4, 2, 2, 0, 0, \(-\(1\/2\)\), 0}\)], "Output"] }, Open ]], Cell[TextData[{ "In fact, as pointed out to us by P. Borwein, one can easily go from the \ two specific formulas to the general one by examining ", Cell[BoxData[ \(TraditionalForm\`formula\_1\)]], " + r (", Cell[BoxData[ \(TraditionalForm\`formula\_2\)]], " - ", Cell[BoxData[ \(TraditionalForm\`formula\_1\)]], "). As a curiosity, we note that r =", Cell[BoxData[ \(TraditionalForm\`1\/8\)]], " yields a series for \[Pi] with first term ", Cell[BoxData[ \(TraditionalForm\`22\/7\)]], ". Thus we can get a series expansion of ", Cell[BoxData[ \(TraditionalForm\`22\/7\)]], " - \[Pi]. By arranging that 1 be the value of the coefficient of ", Cell[BoxData[ \(TraditionalForm\`\(tan\^\(-1\)\)(2)\)]], " we get a series representation of ", Cell[BoxData[ \(TraditionalForm\`\(tan\^\(-1\)\)(2)\)]], ":" }], "Text"], Cell[CellGroupData[{ Cell["\<\ aVals /. First[ Solve[system == {0, 0, 0, 0, 0, 1, 0, 0}]]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, GroupPageBreakWithin->Automatic, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`{8 r + 3, \(-8\)\ r - 2, \(-4\)\ r - 1\/2, \(-8\)\ r - 2, \(-2\)\ r - 3\/4, \(-2\)\ r - 1\/2, r + 1\/8, 0}\)], "Output"] }, Open ]], Cell[TextData[{ "Letting r = - ", Cell[BoxData[ \(TraditionalForm\`1\/4\)]], " leads to several vanishing values:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(% /. r -> \(-1\)/4\)], "Input"], Cell[BoxData[ \(TraditionalForm \`{1, 0, 1\/2, 0, \(-\(1\/4\)\), 0, \(-\(1\/8\)\), 0}\)], "Output"] }, Open ]], Cell[TextData[{ " thus we get the following representation of ", Cell[BoxData[ \(TraditionalForm\`\(tan\^\(-1\)\)(2)\)]], ":" }], "Text"], Cell[BoxData[ \(TraditionalForm \`\(tan\^\(-1\)\)(2) = \[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/16\^k\) \((1\/\(8 k + 1\) + 1\/\(2\ \((8 k + 3)\)\) - 1\/\(4\ \((8 k + 5)\)\) - 1\/\(8\ \((8 k + 7)\)\))\)\)], "Input", Evaluatable->False], Cell["\<\ A quick numerical check is comforting; speedy convergence means \ that 10 terms give agreement to machine precision.\ \>", "Text"], Cell[CellGroupData[{ Cell["\<\ Sum[1/16^k {1, 1/2, -1/4, -1/8} . (1 / (8 k + {1, 3, 5, 7})),{k, 0, \ 15}] == ArcTan[2.]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`True\)], "Output"] }, Open ]], Cell[TextData[{ "The formulas of this section are not particularly useful vis-a-vis \[Pi]. \ But the ", Cell[BoxData[ \(TraditionalForm\`\(tan\^\(-1\)\)(2)\)]], " result seems to be new. More important, perhaps further investigations \ using the symbolic manipulations presented here will be useful in extending \ the incipient theory of digit extraction. " }], "Text"], Cell[TextData[{ StyleBox["Exercise:", FontSize->15, FontWeight->"Bold", FontSlant->"Italic"], " Use this method to derive the following two formulas." }], "Text"], Cell[BoxData[ \(TraditionalForm \`log\ \((3)\) = \[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/16\^\(k + 1\)\) \((16\/\(4 k + 1\) + 4\/\(4 k + 3\))\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`log\ \((5)\) = \[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/16\^\(k + 1\)\) \((16\/\(4 k + 1\) + 16\/\(4 k + 2\) + 4\/\(4 k + 3\))\)\)], "Input", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell["4. And Still More!", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["", "Subsection", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "It turns out to be fruitful to consider generalizations. For example, we \ may consider alternating series, or bases other than 16. For the former we \ can vary e (the sign); for the latter we vary n ( 2n gives the linear \ coefficient and ", Cell[BoxData[ \(TraditionalForm\`2\^n\)]], " gives the base; thus n = 4 yields 8 and 16, respectively, as in section \ 4). Here is a general version of the function g of section 1. " }], "Text"], Cell[BoxData[ \(TraditionalForm \`g[i_, n_, e_]\ := \ 2\^\(i\/2\)\ \(\[Integral]\_0 \%\(1\/\@2\)\(( \[Sum]\+\(k = 0\)\%\[Infinity] e\^k\ z\^\(2 n k + i - 1\)) \)\[ThinSpace]\[DifferentialD]z\)\)], "Input"], Cell["\<\ Throughout this and the next section we will use the following \ functions, which perform various simplifications. It is natural to use such \ specialized simplification routines in a specific project, because the \ built-in simplifications cannot anticipate all possibilities. Of course, it \ takes a bit of work, in a given context, to discover exactly what sort of \ simplifications will be useful; but once that is done, they may as well be \ gathered together in functional form for ease of use.\ \>", "Text"], Cell["\<\ LogOfRadicals[expr_] := expr /. Module[{tmp}, tmp = First /@ Union[ Cases[Level[expr, -2], Log[e_] /; !RationalQ[e]]]; tmp = Select[Flatten[Table[{tmp[[i]], tmp[[j]]}, {i,Length[tmp] - 1}, {j, i + 1, Length[tmp]}], 1], RationalQ[Expand[#[[1]] #[[2]]]]& ]; \tApply[Log[#1] ->-Log[#2] + Log[Expand[Times[##]]]&,\ttmp, {1}] ] FullExpand[e_, fun_:Identity] := \tCollect[LogExpand[LogOfRadicals[e]], \t{Pi, _Log, _ArcTan}, fun] RationalQ[_Integer | _Rational] := True RationalQ[_] := False\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, InitializationCell->True, AspectRatioFixed->True], Cell[TextData[{ StyleBox["LogOfRadicals", FontFamily->"Courier", FontWeight->"Bold"], " simplifies combinations of logarithms of radicals" }], "Text"], Cell[CellGroupData[{ Cell["LogOfRadicals[Log[3 - 1/Sqrt[3]] + Log[3 + 1/Sqrt[3]]]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`log(26\/3)\)], "Output"] }, Open ]], Cell[TextData[{ "while ", StyleBox["FullExpand", FontFamily->"Courier", FontWeight->"Bold"], " applies several of these simplifications at once." }], "Text"], Cell[CellGroupData[{ Cell["FullExpand[Log[3 - 1/Sqrt[3]] + Log[3 + 1/Sqrt[3]]]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`log(2) - log(3) + log(13)\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "n = 2, Alternating: log(5), \[Pi], ", Cell[BoxData[ \(TraditionalForm\`\(tan\^\(-1\)\)(2)\)]] }], "Subsection", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, AspectRatioFixed->True], Cell["\<\ The n = 1 case does not yield anything interesting, so let us start \ with n = 2, with alternating signs (e = -1). There are four terms to add up \ in this case; FullExpand performs major simplifications. The reader might \ wish to examine these and the later computations in unsimplified form.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Clear[a, Subscript]; \)\), \(\(n = 2; \)\), \(aVals = Array[a\_#&, 2 n]; \n rawExpr = FullExpand[aVals.Array[g[#1, n, \(-1\)]&, 2 n]]\)}], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`\(\[Pi] a\_2\)\/2 + \(\(tan\^\(-1\)\)(2)\)\ \((a\_1\/2 - a\_2 + a\_3)\) - 2\ \(log(2)\)\ a\_4 + \(log(5)\)\ \((a\_1\/4 - a\_3\/2 + a\_4)\)\)], "Output"] }, Open ]], Cell[TextData[{ "Things are somewhat simpler than the base-16 case in that the multipliers \ yield a nonsingular system. Thus we can get four representations at once by \ extracting and then inverting the matrix of coefficients of the ", Cell[BoxData[ \(TraditionalForm\`a\_i\)]], "." }], "Text"], Cell[CellGroupData[{ Cell["\<\ transcs = GetTranscendentals[rawExpr]; Coefficient[rawExpr, #] & /@ transcs\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`{a\_2\/2, a\_1\/2 - a\_2 + a\_3, \(-2\)\ a\_4, a\_1\/4 - a\_3\/2 + a\_4} \)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Inverse[Transpose[Table[Coefficient[Expand[%], a\_i], {i, 4}]]]\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"2", "1", "1", "2"}, {"2", "0", "0", "0"}, {"1", \(1\/2\), \(-\(1\/2\)\), \(-1\)}, {"0", "0", \(-\(1\/2\)\), "0"} }, ColumnAlignments->{Decimal}], ")"}], TraditionalForm]], "Output"] }, Open ]], Cell[TextData[{ "The columns give representations for \[Pi], ", Cell[BoxData[ \(TraditionalForm\`\(tan\^\(-1\)\)(2)\)]], ", log(2) and log(5), respectively. Note that the \[Pi]-formula involves \ only 3 terms. Because log(2) has the well known series we omit its \ representation from the following list." }], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Pi] = \[Sum]\+\(k = 0\)\%\[Infinity]\((\(-1\))\)\^k\/4\^k\ \((2\/\(4 k + 1\) + 2\/\(4 k + 2\) + 1\/\(4 k + 3\))\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`\(tan\^\(-1\)\)(2) = \[Sum]\+\(k = 0\)\%\[Infinity]\((\(-1\))\)\^k\/4\^k\ \((1\/\(4 k + 1\) + 1\/\(2\ \((4 k + 3)\)\))\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`log(5) = \[Sum]\+\(k = 0\)\%\[Infinity]\((\(-1\))\)\^k\/4\^k\ \((2\/\(4 k + 1\) - 1\/\(4 k + 3\))\)\)], "Input", Evaluatable->False], Cell[TextData[ "The \[Pi] represention can be used to extract base-4 digits, but the base-16 \ extractor does this anyway, so it is not a computationally important \ simplification. However, it should be noted that the base-4 formula for \[Pi] \ can be split into the case of k even and k odd, in which case a base-16 \ formula (a six-termer that is a case of the general formula in section 3) \ falls right out!"], "Text"], Cell["\<\ In the nonalternating case with n = 2, nothing new arises. We do \ get a series for log(3), but it is identical to the Gregory series mentioned \ in section 1.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["n = 3, Nonalternating: log(7)", "Subsection", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[BoxData[{ \(\(n = 3; \)\), \(aVals\ = Array[a\_#&, 2 n]; \n rawExpr = FullExpand[aVals.\((g[#1, n, 1]&)\)/@Range[2 n]]\)}], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`2\/3\ \@2\ \(log(4 + \@2)\)\ a\_3 + \[Pi]\ \((a\_2\/\(3\ \@3\) - \(2 a\_4\)\/\(3\ \@3\))\) + \(log(3 - \@2)\)\ \((\(-\(a\_1\/\(6\ \@2\)\)\) - \(\@2\ a\_5\)\/3)\) + \(log(3\/2 + 1\/\@2)\)\ \((a\_1\/\(6\ \@2\) + \(\@2\ a\_5\)\/3)\) + \(log(1 + 1\/\@2)\)\ \((\(\@2\ a\_1\)\/3 + \(4\ \@2\ a\_5\)\/3)\) + \(\(tan\^\(-1\)\)(\(\(-1\) + \@2\)\/\@3)\)\ \((a\_1\/\@6 + a\_2\/\@3 - \(2 a\_4\)\/\@3 - \(2\ \@2\ a\_5\)\/\@3) \) + \(\(tan\^\(-1\)\)(\(1 + \@2\)\/\@3)\)\ \((a\_1\/\@6 - a\_2\/\@3 + \(2 a\_4\)\/\@3 - \(2\ \@2\ a\_5\)\/\@3) \) + \(log(7)\)\ \((a\_2\/6 - \(\@2\ a\_3\)\/3 + a\_4\/3 - \(4 a\_6\)\/3)\) + \(log(2)\)\ \((a\_1\/\(2\ \@2\) - \(\@2\ a\_3\)\/3 + \@2\ a\_5 + 4 a\_6)\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ transcs = GetTranscendentals[rawExpr]; (system = DeleteCases[Flatten[ CoefficientList[rawExpr, Join[transcs, {Sqrt[3], Sqrt[2]}]]], 0]) // TableForm\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ FormBox[ InterpretationBox[GridBox[{ {\(\(2 a\_3\)\/3\)}, {\(\(-\(a\_1\/12\)\) - a\_5\/3\)}, {\(a\_1\/12 + a\_5\/3\)}, {\(a\_1\/3 + \(4 a\_5\)\/3\)}, {\(a\_2\/6 + a\_4\/3 - \(4 a\_6\)\/3\)}, {\(-\(a\_3\/3\)\)}, {\(4 a\_6\)}, {\(a\_1\/4 - a\_3\/3 + a\_5\)}, {\(\(2 a\_4\)\/3 - a\_2\/3\)}, {\(a\_1\/6 - \(2 a\_5\)\/3\)}, {\(a\_2\/3 - \(2 a\_4\)\/3\)}, {\(a\_1\/6 - \(2 a\_5\)\/3\)}, {\(a\_2\/9 - \(2 a\_4\)\/9\)} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ { Times[ Rational[ 2, 3], Subscript[ a, 3]], Plus[ Times[ Rational[ -1, 12], Subscript[ a, 1]], Times[ Rational[ -1, 3], Subscript[ a, 5]]], Plus[ Times[ Rational[ 1, 12], Subscript[ a, 1]], Times[ Rational[ 1, 3], Subscript[ a, 5]]], Plus[ Times[ Rational[ 1, 3], Subscript[ a, 1]], Times[ Rational[ 4, 3], Subscript[ a, 5]]], Plus[ Times[ Rational[ 1, 6], Subscript[ a, 2]], Times[ Rational[ 1, 3], Subscript[ a, 4]], Times[ Rational[ -4, 3], Subscript[ a, 6]]], Times[ Rational[ -1, 3], Subscript[ a, 3]], Times[ 4, Subscript[ a, 6]], Plus[ Times[ Rational[ 1, 4], Subscript[ a, 1]], Times[ Rational[ -1, 3], Subscript[ a, 3]], Subscript[ a, 5]], Plus[ Times[ Rational[ -1, 3], Subscript[ a, 2]], Times[ Rational[ 2, 3], Subscript[ a, 4]]], Plus[ Times[ Rational[ 1, 6], Subscript[ a, 1]], Times[ Rational[ -2, 3], Subscript[ a, 5]]], Plus[ Times[ Rational[ 1, 3], Subscript[ a, 2]], Times[ Rational[ -2, 3], Subscript[ a, 4]]], Plus[ Times[ Rational[ 1, 6], Subscript[ a, 1]], Times[ Rational[ -2, 3], Subscript[ a, 5]]], Plus[ Times[ Rational[ 1, 9], Subscript[ a, 2]], Times[ Rational[ -2, 9], Subscript[ a, 4]]]}]], TraditionalForm]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["aVals /. Solve[system == {0,0,0,0,1,0,0,0,0,0,0,0,0}]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"0", "3", "0", \(3\/2\), "0", "0"} }, ColumnAlignments->{Decimal}], ")"}], TraditionalForm]], "Output"] }, Open ]], Cell["\<\ So now we have a proved two-term formula for log(7) (this formula \ can also be deduced by the methods of [BBP]). We rearrange a little to get \ the form below. \ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`log(7) = \[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/8\^\(k + 1\)\) \((12\/\(3 k + 1\) + 6\/\(3 k + 2\))\)\)], "Input", Evaluatable->False], Cell["A numerical check is comforting.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Sum[1/8^\((k + 1)\)\ \((12/\((3 k + 1)\)\ + \ 6/\((3 k + 2)\))\), \ {k, \ 0, \ 20}]\ == \ Log[7.]\)], "Input"], Cell[BoxData[ \(TraditionalForm\`True\)], "Output"] }, Open ]], Cell[TextData[{ "To illustrate the general nature of ", StyleBox["DigitExtractor", FontFamily->"Courier", FontWeight->"Bold"], " , we generate some digits of \nlog(7). The reader can check that the \ digits obtained are correct. We must reinterpret the series as involving", Cell[BoxData[ \(TraditionalForm\`8\^\(-k\)\)]], " as opposed to ", Cell[BoxData[ \(TraditionalForm\`8\^\(\(-k\) - 1\)\)]], "." }], "Text"], Cell[CellGroupData[{ Cell["DigitExtractor[100, 8, {12/8, 6/8, 0}]", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`{3, 0, 0, 5, 7}\)], "Output"] }, Open ]], Cell[TextData[{ StyleBox["Exercise:", FontWeight->"Bold", FontSlant->"Italic"], " Show that the alternating case with n = 3 leads to " }], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Pi]\ \@2 = \[Sum]\+\(k = 0\)\%\[Infinity]\((\(-1\))\)\^k\/8\^k\ \((4\/\(6 k + 1\) + 1\/\(6 k + 3\) + 1\/\(6 k + 5\))\)\)], "Input", Evaluatable->False] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["5. A Powerful Closed Form", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, PageBreakWithin->Automatic, PageBreakBelow->Automatic, AspectRatioFixed->True], Cell[TextData[{ "While we could examine more general bases by replacing 2 with b in the \ integrals defined by ", StyleBox["g", FontFamily->"Courier", FontSize->10], ", a slightly different approach to the general case is more enlightening, \ both in finding formulas and in trying to get a theoretical handle on the big \ picture. In this section we indicate this alternative method, and provide a \ general recipe for searching for series representations for logarithms and \ \[Pi]. As discussed, the starting point is the following type of sum:" }], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/b\^\(n k\)\) \(\[Sum]\+\(i = 1\)\%n a\_i\/\(i + nk\)\)\)], "Input", Evaluatable->False], Cell[TextData[{ "where n is a positive integer and b \[GreaterEqual] 1 is an algebraic \ number. The constants ", Cell[BoxData[ \(TraditionalForm\`a\_i\)]], " (from the computational point of view we are interested only in rational \ values) have to be found so that the sum yields a useful combination of \ logarithms and \[Pi]. The key point is to represent the above sum as a sum of \ integrals:" }], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Sum]\+\(k = 0\)\%\[Infinity]\(\( a\_i\ \)\/b\^n\) \(\[Integral]\_0\%1\( x\^\(i - 1\)\/\(b\^n - x\^n\)\) \[DifferentialD]x\)\)], "Input", Evaluatable->False], Cell[TextData[{ "Thisi dentity is easily proved by expanding the right-side using the \ geometric series formula.Now, instead of relying on a symbolic integrator to \ evaluate the right-handside, we can do it ourselves, which will add both \ speed and understanding to theinvestigation. Using the well-known algorithm \ for integrating rational functions the details are somewhat lengthy and are \ omitted; (the idea is to use the complex roots of ", Cell[BoxData[ RowBox[{" ", FormBox[\(b\^n - a\^n\), "TraditionalForm"]}]]], " which come in conjugate pairs), we obtain the following complicated, but \ nevertheless nicely closed, expression for the right-hand side of(*)." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(GoldenGoose[b_, n_] := \[Sum]\+\(i = 1\)\%n\( 1\/n\) \((a\_i\ b\^i\ \((Log[b]\ \((1 + 2\ \(\[Sum]\+\(k = 1\)\%\(Floor[\(n - 1\)\/2]\)Cos[ \(2 \[Pi] i k\)\/n]\))\) - Log[b - 1] - \((\(-1\))\)\^i\ If[EvenQ[n], Log[b + 1] - Log[b], 0] - \[Sum]\+\(k = 1\)\%\(Floor[\(n - 1\)\/2]\)Cos[ \(2 \[Pi] i k\)\/n]\ Log[b\^2 - 2 b\ Cos[\(2 k \[Pi]\)\/n] + 1] + 2\ \(\[Sum]\+\(k = 1\)\%\(Floor[\(n - 1\)\/2]\)Sin[ \(2 i k \[Pi]\)\/n]\ ArcTan[ Sin[\(2 k \[Pi]\)\/n]\/\(b - Cos[\(2 k \[Pi]\)\/n]\)]\))\))\)\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, InitializationCell->True, AspectRatioFixed->True], Cell[TextData[ "The reader might wish to compare specific instances of the formula to \ results of symbolic integration to provide evidence of correctness. This \ formula is pretty rich for further investigation. For example, the arctangent \ is the only place that could yield \[Pi]. Let see what we can learn by trying \ to get the argument to arctan to be 1. We would need"], "Text"], Cell[BoxData[ \(TraditionalForm \`\(sin(\(2 k \[Pi]\)\/n)\)\/\(b - cos(\(2 k \[Pi]\)\/n)\) = 1\)], "Input", Evaluatable->False], Cell["or", "Text"], Cell[BoxData[ \(TraditionalForm \`b = \(cos(\(2 k \[Pi]\)\/n) + sin(\(2 k \[Pi]\)\/n) = \@2\ \(sin(\(2 \[Pi] k\)\/n + \[Pi]\/4)\)\)\)], "Input", Evaluatable->False], Cell["\<\ Since we want to have our base, b, be an integer, we need to find \ an integer n so that\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`\((\@2\ \(sin(\(2\ \[Pi]\ k\)\/n + \[Pi]\/4)\))\)\^n\)], "Input", Evaluatable->False], Cell[TextData[{ "is a positive integer. Simple experiments show that the first two \ possibilities are: n = 4 and n = 8. The second case (with the base ", Cell[BoxData[ \(TraditionalForm\`b\^n\)]], " = 16) leads to the BBP formula. For n = 4 the base is one. The unit base \ is a singular case of (*): the integrals are divergent. We can avoid the \ resulting singularity by making ", Cell[BoxData[ \(TraditionalForm\`a\_1 + a\_2 + a\_3 + a\_4\)]], " = 0 (one can then view the right side of (*) as" }], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Integral]\(\(p\ x\)\/\(1 - x\^n\)\) \[DifferentialD]x\)], "Input", Evaluatable->False], Cell["\<\ where p(x) is a polynomial and p(1) = 0; thus the troublesome 1 - x \ in the denominator is cancelled, since 1 - x divides p(x)). This yields the \ following expression for the main sum.\ \>", "Text", Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`\[Pi]\ \((a\_1\/8 - a\_3\/8)\) + 2\ \((\(3\ a\_1\)\/4 + a\_2\/2 + \(3\ a\_3\)\/4)\)\ \(log(2)\)\)], "Input", Evaluatable->False], Cell[TextData[ "Setting it equal to \[Pi] produces a one-parameter formula for \[Pi]:"], "Text"], Cell[BoxData[ \(TraditionalForm \`\[Pi] = \[Sum]\+\(k = 0\)\%\[Infinity]\(( \(r - 4\)\/\(4\ k + 3\) + \(r + 4\)\/\(4\ k + 1\) + r\/\(4\ k + 4\) - \(3\ r\)\/\(4\ k + 2\))\)\)], "Input", Evaluatable->False], Cell[TextData[ "If we specialize to r = 0, we simply get a rewritten version of the Leibniz \ series of \[Pi]. So really this should be viewed as a new formula for 0: "], "Text"], Cell[BoxData[ \(TraditionalForm \`0 = \[Sum]\+\(k = 0\)\%\[Infinity]\(( 1\/\(4 k + 1\) - 3\/\(4 k + 2\) + 1\/\(4 k + 3\) + 1\/\(4 k + 4\))\)\)], "Input", Evaluatable->False], Cell[TextData[ "since that is how the Leibniz series becomes a one-parameter family of \ formulas. Despite \nthe fact that nothing new about \[Pi] was learned here, \ it seems to us quite possible that this methodology might lead to \ nonexistence proofs. The outstanding such development would be a proof that \ \[Pi] cannot be represented with this sort of series using powers of 10."], "Text"], Cell["\<\ Of course, we can also use this closed form to explore some \ logarithms. Earlier we obtained several representations of natural logarithms \ of integers (2, 3, 5, and 7) in base 2. Here we consider other bases. Setting \ b to 3 and n to 6 yields a representation of log(13). The procedure is \ similar enough to earlier work that we show only partial output.\ \>", "Text"], Cell[CellGroupData[{ Cell["\<\ Clear[Subscript]; {b, n} = {3, 6}; rawExpr = FullExpand[GoldenGoose[b, n]]; transcs = GetTranscendentals[rawExpr]; Collect[rawExpr, transcs][[-2]]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`\(log(13)\)\ \((a\_1\/4 + \(3 a\_2\)\/4 - \(9 a\_3\)\/2 + \(27 a\_4\)\/4 + \(81 a\_5\)\/4 - \(243 a\_6\)\/2)\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ system = DeleteCases[Flatten[CoefficientList[rawExpr, transcs]], \ 0]; First[%]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`a\_1\/4 + \(3 a\_2\)\/4 - \(9 a\_3\)\/2 + \(27 a\_4\)\/4 + \(81 a\_5\)\/4 - \(243 a\_6\)\/2\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Array[a\_#&, n] /. Solve[system == {1, 0, 0, 0, 0, 0}]\)], "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {\(7\/3\), \(1\/3\), \(4\/27\), \(1\/27\), \(7\/243\), "0"} }, ColumnAlignments->{Decimal}], ")"}], TraditionalForm]], "Output"] }, Open ]], Cell["\<\ This gives a series for log(13), which we rearrange slightly to \ clear fractions.\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`log(13) = \[Sum]\+\(k = 0\)\%\[Infinity]\( 1\/3\^\(6 k + 5\)\) \((567\/\(6 k + 1\) + 81\/\(6 k + 2\) + 36\/\(6 k + 3\) + 9\/\(6 k + 4\) + 7\/\(6 k + 5\))\)\)], "Input", Evaluatable->False], Cell["\<\ Finally, recall that a most intriguing question is whether there \ are any interesting formulas in base 10. So we let b = 10.\ \>", "Text"], Cell[CellGroupData[{ Cell["\<\ rawExpr = Collect[ GoldenGoose[10, 2], _Log, Factor]\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`5\ \(log(11)\)\ \((a\_1 - 10 a\_2)\) + 100\ \(log(10)\)\ a\_2 - 5\ \(log(9)\)\ \((a\_1 + 10 a\_2)\)\)], "Output"] }, Open ]], Cell[TextData[{ "Setting ", Cell[BoxData[ \(TraditionalForm\`a\_1\)]], StyleBox[" ", FontSize->10, FontVariations->{"CompatibilityType"->"Subscript"}], "= 10 ", Cell[BoxData[ \(TraditionalForm\`a\_2\)]], " and ", Cell[BoxData[ \(TraditionalForm\`a\_2\)]], " =-", Cell[BoxData[ \(TraditionalForm\`1\/100\)]], " yields a series that, after simplification, reduces to the Maclaurin \ expansion of ", Cell[BoxData[ \(TraditionalForm\`log(9\/10)\)]], " mentioned in section 1. Setting ", Cell[BoxData[ \(TraditionalForm\`a\_\(1\ \)\)]], "=-", Cell[BoxData[ \(TraditionalForm\`1\/5\)]], " and ", Cell[BoxData[ \(TraditionalForm\`a\_2\)]], StyleBox[" ", FontSize->10, FontVariations->{"CompatibilityType"->"Subscript"}], "= 0 yields a series that is a Gregory expansion of ", Cell[BoxData[ \(TraditionalForm\`log(9\/11)\)]], " (see section 1). So, nothing really new comes from setting b = 10." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["6. Conclusion", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, PageBreakBelow->Automatic, AspectRatioFixed->True], Cell[TextData[{ "We believe that our investigations show the power of ", StyleBox["Mathematica", FontSlant->"Italic"], " in serious symbolic investigations. Not only have we found some new \ formulas, but their discovery comes automatically with a proof. It is, of \ course, very satisfying to discover new formulas, and perhaps readers will be \ inspired to carry these methods farther, perhaps by looking at some new \ forms. It seems promising to investigate alternating series. Our preliminary \ investigations yielded very quickly a new formula for \[Pi] (section 4).\n", StyleBox[" \n", FontSize->6], "Clearly these investigations can be carried farther. Of course, there are \ many more open problems than solved ones! Some of them are listed in [BBP]. \ We'll mention here only that it would be nice if some negative results could \ be obtained, such as the nonexistence of a two-term series for \[Pi], or a \ base-10 series for \[Pi]. Our goal was to develop a technique that might \ yield an approach to such questions. Also, we think we have clearly shown \ exactly where the BBP and related formulas come from, and how \[Pi] arises.\n\ ", StyleBox["\n", FontSize->6], "Moreover, these ideas might well yield new series representations for \ other special numbers or functions. Consider the polylogarithmic function\t" }], "Text"], Cell[BoxData[ \(TraditionalForm \`\(Li\_n\)(z) = \[Sum]\+\(k = 1\)\%\[Infinity] z\^k\/k\^n\)], "Input", Evaluatable->False], Cell["\<\ This form is close to the ones we have looked at and could be \ considered as a starting point for the next generalization. It\[AGrave]s \ natural to consider the following:\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`\[Sum]\+\(k = 1\)\%\[Infinity]\( 1\/b\^\(n k\)\) \(1\/k\^m\) \(\[Sum]\+\(i = 1\)\%\(n + m\)a\_i\/\(i + nk\)\)\)], "Input", Evaluatable->False], Cell["\<\ This form of series can be obtained from formula (*) in section 6, \ integrating the latter m times with respect to x. Since the repeated \ integration produces m free parameters we add them to the inner sum. Then our \ algebraic techniques yielded:\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`\(Li\_2\)(1\/2) = \[Sum]\+\(k = 1\)\%\[Infinity]\( 1\/\(2\^k\ k\^2\)\) \((\(-\(8\/\(k + 1\)\)\) - 10\/\(4 k + 1\) - 54\/\(2 k + 3\) + 12\/\(2 k + 1\) + 125\/\(4 k + 5\))\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`\(Li\_3\)(1\/2) = \[Sum]\+\(k = 1\)\%\[Infinity]\( 1\/\(2\^k\ k\^3\)\) \((\(-\(24\/\(2 k + 1\)\)\) - 625\/\(2\ \((4 k + 5)\)\) - 2401\/\(6\ \((4 k + 7)\)\) + 5\/\(4 k + 1\) + 324\/\(2 k + 3\) + 63\/\(4 k + 3\) + 32\/\(3\ \((k + 1)\)\)) \)\)], "Input", Evaluatable->False], Cell["\<\ From the computational perspective these are not that valuable, \ except to provide slightly faster convergence than the definition. But from \ the theoretical standpoint this gives another method of generating various \ classes of new series representations. Here are examples:\ \>", "Text"], Cell[BoxData[ \(TraditionalForm \`\[Zeta](\ 3) = \[Sum]\+\(k = 1\)\%\[Infinity]\( 1\/k\^3\) \((\(-\(1\/\(k + 1\)\)\) + 16\/\(k + 2\) + 3\/\(4\ \((2 k + 1)\)\) - 81\/\(4\ \((2 k + 3)\)\))\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`\[Pi]\^2 = \[Sum]\+\(k = 1\)\%\[Infinity]\( 1\/k\^3\) \((\(-\(12\/\(k + 1\)\)\) + 384\/\(k + 2\) + 45\/\(2\ \((2 k + 1)\)\) - 1215\/\(2\ \((2 k + 3)\)\))\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(TraditionalForm \`\[Pi] = \[Sum]\+\(k = 1\)\%\[Infinity]\( 1\/k\^3\) \((\(-\(238\/\(k + 1\)\)\) + 285\/\(2\ \((2 k + 1)\)\) - 667\/\(32\ \((4 k + 1)\)\) - 5103\/\(16\ \((4 k + 3)\)\) + 35625\/\(32\ \((4 k + 5)\)\))\)\)], "Input", Evaluatable->False], Cell["\<\ We are grateful to David Bailey, Peter Borwein, and Simon Plouffe \ for sharing with us many of their insights and unpublished work in this \ area,and to Mark Sofroniou and Michael Trott (WRI) for some helpful observations.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Appendix: Sum Subtleties", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "In order to compute some far-out base-16 digits using the BBP type of \ formula, one must pay attention to some subtleties of ", StyleBox["Sum", FontFamily->"Courier", FontWeight->"Bold"], ". There are three basic ways to form a sum: (1) use ", StyleBox["Sum", FontFamily->"Courier", FontWeight->"Bold"], ", (2) apply ", StyleBox["Plus", FontFamily->"Courier", FontWeight->"Bold"], ", or (3) use a ", StyleBox["Do", FontFamily->"Courier", FontWeight->"Bold"], "-loop. Method (2), an example of which is ", StyleBox["Apply[Plus, Table[i, {i, ", FontFamily->"Courier", FontWeight->"Bold"], StyleBox["1000}]]", FontFamily->"Courier", FontWeight->"Bold"], ", is useful for small sets, but it is clearly costly in terms of memory \ since the entire table must be computed and stored. So we will restrict our \ discussion here to a comparison of mathods (1) and (3). Here they are, with \ calls to ", StyleBox["MemoryInUse", FontFamily->"Courier", FontWeight->"Bold"], " to compare the memory required." }], "Text"], Cell[CellGroupData[{ Cell["\<\ CheckMemory := Print[-mOld + (mOld = MemoryInUse[])] mOld = MemoryInUse[]; Sum[i, {i, 1000}]; CheckMemory; s = 0; Do[s += i, {i, 1000}]; CheckMemory;\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`624\)], "Print"], Cell[BoxData[ \(TraditionalForm\`656\)], "Print"] }, Open ]], Cell["\<\ This output shows a similar memory consumption, but in fact this is \ not the whole truth. A more careful comparison checks the memory as the sum \ is being computed, but prints out results only for the first few values of \ the index (the omitted values are all 0).\ \>", "Text"], Cell[CellGroupData[{ Cell["\<\ s1 = Sum[If[i < 4, CheckMemory]; i, {i, 1000}]; CheckMemory; Print[\"\"]; s3 = 0; Do[If[i < 4, CheckMemory]; s3 += i, {i, 1000}]; CheckMemory\ \>", "Input", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm\`4768\)], "Print"], Cell[BoxData[ \(TraditionalForm\`0\)], "Print"], Cell[BoxData[ \(TraditionalForm\`0\)], "Print"], Cell[BoxData[ \(TraditionalForm\`\(-3568\)\)], "Print"], Cell[BoxData[ \(TraditionalForm\`""\)], "Print"], Cell[BoxData[ \(TraditionalForm\`832\)], "Print"], Cell[BoxData[ \(TraditionalForm\`0\)], "Print"], Cell[BoxData[ \(TraditionalForm\`0\)], "Print"], Cell[BoxData[ \(TraditionalForm\`416\)], "Print"] }, Open ]], Cell[TextData[{ "Big surprise! Method (1) has a fairly large internal consumption; the \ negative value indicates that memory is being freed up after the sum is \ computed. And the ", StyleBox["Do", FontFamily->"Courier", FontWeight->"Bold"], "-loop uses up hardly any memory at all. If the number of terms is \ increased, the first memory profile increases accordingly, but the second \ stays where it is, at virtually no consumption. This means that ", StyleBox["Sum", FontFamily->"Courier", FontSize->10], " cannot be used to add up, say, a million numbers. A ", StyleBox["Do", FontFamily->"Courier", FontWeight->"Bold"], "-loop is essential in such a case." }], "Text"], Cell[TextData[{ "In fact, ", StyleBox["Sum", FontFamily->"Courier", FontWeight->"Bold"], " was designed mostly for symbolic calulations. And ", StyleBox["Sum", FontFamily->"Courier", FontWeight->"Bold"], " is very powerful working with symbols rather then performing numerical \ calculations, as shown by the following example." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(sum1\ = \ Sum[f[k], \ {k, \ 500, \ 1, \ \(-1\)}]; \)\ // Timing\)], "Input"], Cell[BoxData[ \(TraditionalForm\`{0.0399930000000381369`\ Second, Null}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(sum2\ = \ 0; \n \(Do[sum2\ += \ f[k], \ {k, \ 500, \ 1, \ \(-1\)}]; \)\ // Timing\)], "Input"], Cell[BoxData[ \(TraditionalForm\`{7.10968299999996133`\ Second, Null}\)], "Output"] }, Open ]], Cell[TextData[{ "The ", StyleBox["Do", FontFamily->"Courier", FontWeight->"Bold"], "-loop is much slower in this case because on each iteration, function ", StyleBox["Plus", FontFamily->"Courier", FontWeight->"Bold"], " sorts its arguments, while with ", StyleBox["Sum", FontFamily->"Courier", FontWeight->"Bold"], " arguments are sorted only one time (since ", StyleBox["Plus", FontFamily->"Courier", FontWeight->"Bold"], " is applied only at the end)." }], "Text"], Cell[BoxData[ \(\(Clear[s1, s3, sum1, \ sum2, \ mOld]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Addendum for Electronic Version of Paper", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, 12}}, Evaluatable->False, AspectRatioFixed->True], Cell["\<\ Here is a faster version of DigitExtractor, contributed by WRI's \ Mark Sofroniou. It is about twice as fast as the version given in the paper, \ but a little (though only a little) more complicated.\ \>", "Text"], Cell["\<\ DigitExtractor::usage = \"DigitExtractor[d, b, coeffs] computes \ five base-Abs[b] digits starting from the dth of the real number given by Sum[1/b^k coeffs . (1/(m k + Range[m])), {k, 1, Infinity}], where m = \ Length[coeffs]. The variable term controls the truncation error; 15 should be \ adequate. All computations are done in machine precision so d should not be \ greater than about ten million, or else roundoff error will be excessive for \ the goal of 5 digits.\"; \ \>", "Input"], Cell[BoxData[ \(\(DigitExtractor[d_, b_, coeffs_List] := Module[{m, nb, ncoeffs, offsets, posns, pow, reald, sum, terms}, ter m s = 15; base = Abs[b]; sign = Sign[b]; pow = d - 1; sum = 0; n b = N[base]; m = Length[coeffs]; ncoef f s = N[DeleteCases[coeffs, 0]]; pos n s = Flatten[Position[coeffs, _?\((# != 0&)\)]]; offsets = posns; \n\t\t Do[sum = Mod[sum + sign^\((pow - k)\)*\n\t\t\t \((ncoeffs/offsets)\).\((PowerMod[base, k, offsets])\), 1]; offse t s += m, {k, pow, 0, \(-1\)}]; \n\t\t offsets = posns + \((pow + 1)\)\ m; \n\t\t Do[sum = Mod[sum + sign^\((pow + k)\)\ \((ncoeffs)\).\((nb^\((\(-k\))\)/offsets)\), 1]; offse t s += m, {k, 1, terms}]; reald = RealDigits[sum, base]; Take[Join[Table[0, {\(-reald[\([2]\)]\)}], reald[\([1]\)]], 5]\n\t]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["References", "Section", CellMargins->{{Inherited, 41.375}, {Inherited, 12}}, Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "[BBP] D. Bailey, P. Borwein, and S. Plouffe, On the rapid computation of \ various polylogarithmic constants, ", StyleBox["Mathematics of Computation", FontSlant->"Italic"], " (forthcoming).\n\n[Cra] R.E. Crandall, ", StyleBox["Topics in Advanced Scientific Computation", FontSlant->"Italic"], ", Springer/TELOS, New York, 1995.\n\n[RW] S. Rabinowitz and S. Wagon, A \ spigot algorithm for \[Pi], ", StyleBox["American Mathemat ical Monthly", FontSlant->"Italic"], " ", StyleBox["102", FontWeight->"Bold"], " (1995) 195-203." }], "Reference", CellMargins->{{Inherited, 41.375}, {Inherited, Inherited}}, Evaluatable->False, AspectRatioFixed->True] }, Closed]] }, Open ]] }, FrontEndVersion->"NeXT 3.0", ScreenRectangle->{{0, 1053}, {0, 832}}, AutoGeneratedPackage->None, WindowToolbars->{"RulerBar", "EditBar"}, Evaluator->"Local", WindowSize->{654, 719}, WindowMargins->{{Automatic, 57}, {Automatic, 10}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, 128}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, Magnification->1.25, StyleDefinitions -> "ArticleClassic.nb" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 494, 17, 82, "Title", PageBreakBelow->Automatic], Cell[2228, 70, 551, 21, 183, "Text"], Cell[CellGroupData[{ Cell[2804, 95, 200, 5, 66, "Section", PageBreakWithin->Automatic, PageBreakBelow->Automatic], Cell[3007, 102, 484, 7, 70, "Text"], Cell[3494, 111, 299, 7, 70, "Input"], Cell[3796, 120, 1178, 18, 70, "Text"], Cell[4977, 140, 389, 10, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[5403, 155, 237, 5, 33, "Section", PageBreakWithin->Automatic, PageBreakBelow->Automatic], Cell[5643, 162, 132, 3, 70, "Text"], Cell[5778, 167, 685, 15, 70, "Input"], Cell[6466, 184, 99, 3, 70, "Text"], Cell[6568, 189, 256, 7, 70, "Input"], Cell[6827, 198, 65, 0, 70, "Text"], Cell[CellGroupData[{ Cell[6917, 202, 144, 2, 70, "Input"], Cell[7064, 206, 56, 1, 70, "Output"] }, Open ]], Cell[7135, 210, 136, 2, 70, "Text"], Cell[7274, 214, 223, 6, 70, "Input"], Cell[7500, 222, 510, 10, 70, "Text"], Cell[8013, 234, 368, 8, 70, "Input"], Cell[8384, 244, 363, 8, 70, "Input"], Cell[8750, 254, 1433, 42, 70, "Text"], Cell[CellGroupData[{ Cell[10208, 300, 270, 6, 70, "Input"], Cell[10481, 308, 1128, 35, 70, "Output"] }, Open ]], Cell[11624, 346, 272, 4, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[11933, 355, 179, 4, 33, "Section", PageBreakBelow->Automatic], Cell[12115, 361, 145, 3, 70, "Text"], Cell[12263, 366, 206, 5, 70, "Input"], Cell[12472, 373, 381, 10, 70, "Text"], Cell[12856, 385, 232, 5, 70, "Input"], Cell[13091, 392, 133, 3, 70, "Text"], Cell[13227, 397, 218, 5, 70, "Input"], Cell[13448, 404, 2152, 46, 70, "Text"], Cell[15603, 452, 1100, 21, 70, "Input"], Cell[16706, 475, 125, 5, 70, "Text"], Cell[CellGroupData[{ Cell[16856, 484, 155, 2, 70, "Input"], Cell[17014, 488, 67, 1, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17118, 494, 124, 2, 70, "Input"], Cell[17245, 498, 201, 6, 70, "Output"] }, Open ]], Cell[17461, 507, 107, 3, 70, "Text"], Cell[CellGroupData[{ Cell[17593, 514, 158, 2, 70, "Input"], Cell[17754, 518, 67, 1, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17858, 524, 161, 2, 70, "Input"], Cell[18022, 528, 55, 1, 70, "Output"] }, Open ]], Cell[18092, 532, 120, 3, 70, "Text"], Cell[CellGroupData[{ Cell[18237, 539, 158, 2, 70, "Input"], Cell[18398, 543, 197, 8, 70, "Output"] }, Open ]], Cell[18610, 554, 812, 14, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[19459, 573, 212, 4, 33, "Section", PageBreakWithin->Automatic], Cell[19674, 579, 127, 3, 32, "Input", InitializationCell->True], Cell[19804, 584, 305, 6, 69, "Text"], Cell[20112, 592, 441, 9, 114, "Input"], Cell[20556, 603, 113, 3, 31, "Text"], Cell[CellGroupData[{ Cell[20694, 610, 233, 5, 67, "Input"], Cell[20930, 617, 56, 1, 34, "Output"] }, Open ]], Cell[21001, 621, 633, 14, 107, "Text"], Cell[CellGroupData[{ Cell[21659, 639, 240, 5, 49, "Input", PageBreakWithin->Automatic], Cell[21902, 646, 2137, 42, 626, "Output"] }, Open ]], Cell[24054, 691, 194, 4, 50, "Text"], Cell[24251, 697, 333, 8, 101, "Input", InitializationCell->True], Cell[24587, 707, 74, 0, 31, "Text"], Cell[CellGroupData[{ Cell[24686, 711, 264, 6, 84, "Input"], Cell[24953, 719, 1113, 19, 259, "Output"] }, Open ]], Cell[26081, 741, 289, 9, 52, "Text"], Cell[26373, 752, 222, 6, 50, "Input", InitializationCell->True], Cell[26598, 760, 542, 16, 88, "Text"], Cell[CellGroupData[{ Cell[27165, 780, 142, 2, 33, "Input"], Cell[27310, 784, 150, 3, 47, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[27497, 792, 150, 2, 33, "Input"], Cell[27650, 796, 679, 13, 238, "Output"] }, Open ]], Cell[28344, 812, 778, 18, 132, "Text"], Cell[CellGroupData[{ Cell[29147, 834, 258, 7, 67, "Input"], Cell[29408, 843, 3004, 99, 236, "Output"] }, Open ]], Cell[32427, 945, 412, 9, 90, "Text"], Cell[CellGroupData[{ Cell[32864, 958, 146, 2, 33, "Input"], Cell[33013, 962, 269, 5, 91, "Output"] }, Open ]], Cell[33297, 970, 179, 5, 31, "Text"], Cell[CellGroupData[{ Cell[33501, 979, 199, 4, 49, "Input"], Cell[33703, 985, 155, 3, 34, "Output"] }, Open ]], Cell[33873, 991, 144, 2, 50, "Text"], Cell[CellGroupData[{ Cell[34042, 997, 123, 2, 33, "Input"], Cell[34168, 1001, 90, 1, 34, "Output"] }, Open ]], Cell[34273, 1005, 144, 2, 50, "Text"], Cell[CellGroupData[{ Cell[34442, 1011, 126, 2, 33, "Input"], Cell[34571, 1015, 87, 1, 51, "Output"] }, Open ]], Cell[34673, 1019, 892, 27, 110, "Text"], Cell[CellGroupData[{ Cell[35590, 1050, 208, 6, 50, "Input"], Cell[35801, 1058, 170, 3, 51, "Output"] }, Open ]], Cell[35986, 1064, 138, 5, 34, "Text"], Cell[CellGroupData[{ Cell[36149, 1073, 51, 1, 32, "Input"], Cell[36203, 1076, 107, 2, 51, "Output"] }, Open ]], Cell[36325, 1081, 149, 5, 31, "Text"], Cell[36477, 1088, 280, 7, 64, "Input"], Cell[36760, 1097, 140, 3, 50, "Text"], Cell[CellGroupData[{ Cell[36925, 1104, 201, 5, 50, "Input"], Cell[37129, 1111, 55, 1, 34, "Output"] }, Open ]], Cell[37199, 1115, 381, 8, 88, "Text"], Cell[37583, 1125, 178, 6, 34, "Text"], Cell[37764, 1133, 202, 5, 64, "Input"], Cell[37969, 1140, 224, 6, 64, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[38230, 1151, 147, 3, 33, "Section"], Cell[CellGroupData[{ Cell[38402, 1158, 132, 3, 70, "Subsection"], Cell[38537, 1163, 466, 9, 70, "Text"], Cell[39006, 1174, 272, 7, 70, "Input"], Cell[39281, 1183, 524, 8, 70, "Text"], Cell[39808, 1193, 648, 20, 70, "Input", InitializationCell->True], Cell[40459, 1215, 162, 5, 70, "Text"], Cell[CellGroupData[{ Cell[40646, 1224, 159, 2, 70, "Input"], Cell[40808, 1228, 61, 1, 70, "Output"] }, Open ]], Cell[40884, 1232, 171, 6, 70, "Text"], Cell[CellGroupData[{ Cell[41080, 1242, 156, 2, 70, "Input"], Cell[41239, 1246, 76, 1, 70, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[41364, 1253, 248, 7, 70, "Subsection"], Cell[41615, 1262, 321, 6, 70, "Text"], Cell[CellGroupData[{ Cell[41961, 1272, 274, 6, 70, "Input"], Cell[42238, 1280, 212, 5, 70, "Output"] }, Open ]], Cell[42465, 1288, 308, 7, 70, "Text"], Cell[CellGroupData[{ Cell[42798, 1299, 188, 5, 70, "Input"], Cell[42989, 1306, 135, 3, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[43161, 1314, 187, 4, 70, "Input"], Cell[43351, 1320, 309, 8, 70, "Output"] }, Open ]], Cell[43675, 1331, 329, 7, 70, "Text"], Cell[44007, 1340, 216, 6, 70, "Input"], Cell[44226, 1348, 217, 5, 70, "Input"], Cell[44446, 1355, 196, 5, 70, "Input"], Cell[44645, 1362, 423, 6, 70, "Text"], Cell[45071, 1370, 183, 4, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[45291, 1379, 161, 3, 70, "Subsection"], Cell[CellGroupData[{ Cell[45477, 1386, 241, 5, 70, "Input"], Cell[45721, 1393, 838, 15, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[46596, 1413, 266, 8, 70, "Input"], Cell[46865, 1423, 3035, 103, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[49937, 1531, 158, 2, 70, "Input"], Cell[50098, 1535, 194, 5, 70, "Output"] }, Open ]], Cell[50307, 1543, 187, 4, 70, "Text"], Cell[50497, 1549, 195, 5, 70, "Input"], Cell[50695, 1556, 48, 0, 70, "Text"], Cell[CellGroupData[{ Cell[50768, 1560, 143, 2, 70, "Input"], Cell[50914, 1564, 55, 1, 70, "Output"] }, Open ]], Cell[50984, 1568, 447, 13, 70, "Text"], Cell[CellGroupData[{ Cell[51456, 1585, 143, 2, 70, "Input"], Cell[51602, 1589, 66, 1, 70, "Output"] }, Open ]], Cell[51683, 1593, 159, 5, 70, "Text"], Cell[51845, 1600, 221, 6, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[52115, 1612, 213, 5, 33, "Section", PageBreakWithin->Automatic, PageBreakBelow->Automatic], Cell[52331, 1619, 574, 11, 107, "Text"], Cell[52908, 1632, 177, 4, 64, "Input"], Cell[53088, 1638, 424, 9, 88, "Text"], Cell[53515, 1649, 224, 5, 66, "Input"], Cell[53742, 1656, 764, 15, 145, "Text"], Cell[54509, 1673, 977, 19, 301, "Input", InitializationCell->True], Cell[55489, 1694, 386, 5, 88, "Text"], Cell[55878, 1701, 144, 4, 84, "Input"], Cell[56025, 1707, 18, 0, 31, "Text"], Cell[56046, 1709, 189, 4, 59, "Input"], Cell[56238, 1715, 112, 3, 31, "Text"], Cell[56353, 1720, 129, 3, 59, "Input"], Cell[56485, 1725, 533, 11, 88, "Text"], Cell[57021, 1738, 132, 3, 68, "Input"], Cell[57156, 1743, 232, 5, 50, "Text"], Cell[57391, 1750, 182, 5, 58, "Input"], Cell[57576, 1757, 99, 2, 31, "Text"], Cell[57678, 1761, 244, 6, 64, "Input"], Cell[57925, 1769, 181, 3, 50, "Text"], Cell[58109, 1774, 210, 5, 64, "Input"], Cell[58322, 1781, 399, 6, 88, "Text"], Cell[58724, 1789, 383, 6, 88, "Text"], Cell[CellGroupData[{ Cell[59132, 1799, 259, 8, 101, "Input"], Cell[59394, 1809, 189, 4, 51, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[59620, 1818, 192, 6, 67, "Input"], Cell[59815, 1826, 159, 3, 51, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[60011, 1834, 175, 3, 32, "Input"], Cell[60189, 1839, 218, 5, 41, "Output"] }, Open ]], Cell[60422, 1847, 106, 3, 31, "Text"], Cell[60531, 1852, 271, 6, 64, "Input"], Cell[60805, 1860, 149, 3, 50, "Text"], Cell[CellGroupData[{ Cell[60979, 1867, 167, 5, 50, "Input"], Cell[61149, 1874, 164, 3, 34, "Output"] }, Open ]], Cell[61328, 1880, 1011, 36, 101, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[62376, 1921, 171, 4, 33, "Section", PageBreakBelow->Automatic], Cell[62550, 1927, 1379, 24, 70, "Text"], Cell[63932, 1953, 133, 3, 70, "Input"], Cell[64068, 1958, 197, 4, 70, "Text"], Cell[64268, 1964, 196, 4, 70, "Input"], Cell[64467, 1970, 273, 5, 70, "Text"], Cell[64743, 1977, 285, 6, 70, "Input"], Cell[65031, 1985, 381, 8, 70, "Input"], Cell[65415, 1995, 302, 5, 70, "Text"], Cell[65720, 2002, 269, 7, 70, "Input"], Cell[65992, 2011, 270, 7, 70, "Input"], Cell[66265, 2020, 327, 7, 70, "Input"], Cell[66595, 2029, 247, 5, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[66879, 2039, 153, 3, 33, "Section"], Cell[67035, 2044, 1110, 33, 70, "Text"], Cell[CellGroupData[{ Cell[68170, 2081, 263, 8, 70, "Input"], Cell[68436, 2091, 53, 1, 70, "Print"], Cell[68492, 2094, 53, 1, 70, "Print"] }, Open ]], Cell[68560, 2098, 290, 5, 70, "Text"], Cell[CellGroupData[{ Cell[68875, 2107, 255, 8, 70, "Input"], Cell[69133, 2117, 54, 1, 70, "Print"], Cell[69190, 2120, 51, 1, 70, "Print"], Cell[69244, 2123, 51, 1, 70, "Print"], Cell[69298, 2126, 59, 1, 70, "Print"], Cell[69360, 2129, 52, 1, 70, "Print"], Cell[69415, 2132, 53, 1, 70, "Print"], Cell[69471, 2135, 51, 1, 70, "Print"], Cell[69525, 2138, 51, 1, 70, "Print"], Cell[69579, 2141, 53, 1, 70, "Print"] }, Open ]], Cell[69647, 2145, 711, 18, 70, "Text"], Cell[70361, 2165, 366, 11, 70, "Text"], Cell[CellGroupData[{ Cell[70752, 2180, 103, 2, 70, "Input"], Cell[70858, 2184, 89, 1, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[70984, 2190, 124, 3, 70, "Input"], Cell[71111, 2195, 87, 1, 70, "Output"] }, Open ]], Cell[71213, 2199, 516, 18, 70, "Text"], Cell[71732, 2219, 74, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[71843, 2225, 162, 3, 33, "Section"], Cell[72008, 2230, 223, 4, 70, "Text"], Cell[72234, 2236, 500, 8, 70, "Input"], Cell[72737, 2246, 995, 20, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[73769, 2271, 132, 3, 33, "Section"], Cell[73904, 2276, 703, 19, 70, "Reference"] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)