inf ==== \ N! N! 4 2PROBLEM: Evaluate in closed formpi> ------ = - + --------- . / (2 N)! 3 9 SQRT(3) ==== N=0

inf ==== \ N! N! N! > -------- , which = / (3 N)! ==== N=0 1 / [ I (P + Q arccos (R)) dT , where ] / 0 2 3 2 (8 + 7 T - 7 T ) P = ------------------- and 2 3 2 (4 - T + T ) 2 2 3 4 (T - T ) (5 + T - T ) Q = ------------------------------------------ and 2 3 2 2 3 (4 - T + T ) SQRT((4 - T + T ) (1 - T)) 2 3 T - T R = 1 - ------- . 2

2 3 4 X X XWhere ERROR is of the order of (gamma= - ln X + X - ---- + ---- - ---- ... + ERROR 2 2! 3 3! 4 4!

-Y Y E = X to get Y + Y X Y' - X Y' = 0.Substitute for Y a power series in X with coefficients to be determined. One observes the curious identity:

N ==== \ J - 1 N - J N 0 > J (N - J) BINOMIAL(N, J) = N (0 = 1) / ==== J=1and thus

==== N - 1 N \ N X Y(X) = > --------- / N! ==== N=1

2 ====pi1 1 \ 1 -- = -- + -- + ... = > -- ? 6 2 2 / 2 1 2 ==== N

(Abramowitz & Stegun, se. 3.6.27)

==== K K \ (-1) (delta A0) A0 - A1 + A2 - ... = > ----------------- / K+1 ==== 2 K ==== K \ K-m (where (DELTA A0) = > BINOMIAL(K, m) (-1) Am = Kth forward difference on A0) / ==== m=0when applied to

givespi1 1 -- = 1 - - + - - ... 4 3 5

==== N-1 2Applied to the formula forpi\ 2 N! -- = > ---------- 4 / (2 N + 1)! ==== N=0

==== T \ (- 1) [LOG2(T)] > ---------------- ([ ] means integer part of) / T ==== T=0we get

inf K-1 ==== ==== \ -(K+1) \ 1 > 2 > ------------------ / / I ==== ==== BINOMIAL(2 + J, J) K=1 J=0(Gosper) which converges fast enough for a few hundred digits.

The array of reciprocals of the terms follows, with powers of 2
factored out to the left from all member of each row.

The next to left diagonal is 2^(N+1); the perpendicular one 3rd from the right is 1, *9/1= 9, *10/2= 45, *11/3= 165, *12/4= 495.4 1 8 1 3 16 1 5 6 32 1 9 15 10 64 1 17 45 35 15 128 1 33 153 165 70 21 256 1 65 561 969 495 126 28

1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 1 57 302 302 57 1

inf ==== 1 \ PARITY(N) - > --------- 2 / N ==== 2 N=0where the parity of N is the sum the bits of N mod 2. The parity number's value is .4124540336401075977..., or, for hexadecimal freaks, .6996966996696996... . It can be written (base 2) in stages by taking the previous stage, complementing, and appending to the previous stage:

.0 .01 .0110 .01101001 .0110100110010110 .01101001100101101001... radix 2i.e.,

stage 0 = 0 N -2 1 - 2 - stage N stage N+1 = stage N + ----------------- . N 2 2If

NUM 0 = 0, DEN 0 = 2 NUM N+1 = ((NUM N)+1) * ((DEN N)-1) N+1 2 2 DEN N+1 = (DEN N) = 2then

N N NUM N+1 -2 -2 ------- = stage N+1 = (stage N + 2 ) * (1 - 2 ) . DEN N+1Or, faster, by substituting in the string at any stage:

- the string itself for zeros, and
- the complement of the string for ones.

Its regular continued fraction begins: 0 2 2 2 1 4 3 5 2 1 4 2 1 5 44 1 4 1 2 4 1 1 1 5 14 1 50 15 5 1 1 1 4 2 1 4 1 43 1 4 1 2 1 3 16 1 2 1 2 1 50 1 2 424 1 2 5 2 1 1 1 5 5 2 22 5 1 1 1 1274 3 5 2 1 1 1 4 1 1 15 154 7 2 1 2 2 1 2 1 1 50 1 4 1 2 867374 1 1 1 5 5 1 1 6 1 2 7 2 1650 23 3 1 1 1 2 5 3 84 1 1 1 1284 ... and seems to continue with sporadic large terms in suspicious patterns. A non-regular fraction is

1/(3 -1/(2 -1/(4 -3/(16 -15/(256 -255/(65536 -65535/ N N 2 2 (...2 -(2 -1)/(... .This fraction converges much more rapidly than the regular one, its Nth approximant being

1 + NUM N --------- , 1 + DEN Nwhich is, in fact, an approximant of the regular fraction, roughly the 2^N'th.

In addition, 4*(parity number) =

1 3 15 255 65535 2 - - * - * -- * --- * ----- * ... 2 4 16 256 65536This gives still another non-regular fraction per the product conversion item in the CONTINUED FRACTION section.

For another property of the parity number, see the spacefilling curve item in the TOPOLOGY section.

n === 2 \ z f(z) = > --- . / n === 2This is physically analogous to a series of clock hands placed end to end. The first hand rotates around the center (0,0) at some rate. the next hand is half as long and rotates around the end of the first hand at twice this rate. The third hand rotates around the end of the second at four times this rate; etc. It would seem that the end of the "last" hand (really there are infinitely many) would sweep through space very fast, tracing out an (infinitely) long curve in the time the first hand rotates once. The hands shrink, however, because of the 2^n in the denominator. Thus it is unclear whether the curve's arc length is really infinite.

Also, it is a visually interesting curve, as are

=== n! === FIB(n) \ z \ z f(z) = > --- and f(z) = > ------- . / n! / FIB(n) === ===Gosper has programmed the one mentioned first, which makes an intriguing display pattern. see following illustrations. If you write a program to display this, be sure to allow easy changing of:

- z and z* on alternate terms (alternate hands rotate in opposite directions),
- negation of alternate terms (alternate hands initially point in opposite directions), and
- how many terms are used in the computation, since these cause fascinating variations in the resulting curve.

inf === n! \ z f(z) = > --- . / n! === n=1Figure 6(b). Image of circles |z| = 1/8, 2/8, ..., 8/8 under the function

inf n === 2 \ z f(z) = > --- . / n === 2 n=0Both [original] plots by Salamin on the RLE PDP-1.

==== ==== ==== \ 1 \ 1 1 \ 1 1 > -- = > (-- - ------) + > (----- - -----) = / 2 / 2 2 1 / 1 1 ==== N ==== N N - - ==== N - - N + - 4 2 2 ==== \ 1 2 - > ------------- . / 2 2 ==== N (4 N - 1)Take the last sum and re-apply this transformation. This may be a winner for computing the original sum. For example, the next iteration gives

==== 31 \ 1 -- - 9 > -------------------------------- 18 / 2 2 4 2 ==== N (4 N - 1) (25 N + 5 N + 9)where the denominator also =

2 2 2 N (2 N - 1) (2 N + 1) (5 N - 5 N + 3) (5 N + 5 N + 3)

Reference: Polya, *Mathematics and Plausible Reasoning*, volume 2, page
46.