home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / sci / math / 18848 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  5.5 KB

  1. Path: sparky!uunet!europa.eng.gtefsd.com!emory!gatech!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!samsung!balrog!web.ctron.com!wilson
  2. From: wilson@web.ctron.com (David Wilson)
  3. Newsgroups: sci.math
  4. Subject: Re: A strange recurrence and RESULT ABOUT PI
  5. Message-ID: <6604@balrog.ctron.com>
  6. Date: 28 Jan 93 19:15:10 GMT
  7. Sender: usenet@balrog.ctron.com
  8. Reply-To: wilson@web.ctron.com (David Wilson)
  9. Organization: Cabletron Systems INc.
  10. Lines: 180
  11. Nntp-Posting-Host: web
  12. Originator: wilson@web
  13.  
  14.  
  15.     In <1993Jan26.001256.12160@greco-prog.fr>, plouffe@greco-prog.fr
  16.     (Simon Plouffe [melancon]) writes:
  17.  
  18.  
  19. >    Let a(1)=1/2 and iterate the following recurrence :
  20. >
  21. >                                              a(n)
  22. >                              a(n + 1) = 2 ---------
  23. >                                                   2
  24. >                                           1 - a(n)
  25. > This gives the numbers
  26. >
  27. >                                       336  354144
  28. >                      1/2, 4/3, -24/7, ---, ------, ....
  29. >                                       527  164833
  30. >
  31. > Now define this sign function to be,
  32. >
  33. > sign(x) = 0 if x <= 0
  34. >           1 if x >  0
  35. >
  36. >    If you take the sum
  37. >
  38. >                              infinity
  39. >                               -----
  40. >                                \      sign(a(i))
  41. >                        v =      )     ----------
  42. >                                /           i
  43. >                               -----       2
  44. >                               i = 1
  45. >
  46. > This real number appears to be
  47. >
  48. >                                   arctan(1/2)
  49. >                         v =   1 - -----------
  50. >                                        Pi
  51. >
  52. > The questions are :
  53. >
  54. > 0)  Is this known ?
  55.  
  56.     I can't tell you if it is written down, but I can tell you that it
  57.     is not especially deep.
  58.  
  59. > 1)  Can we explain this fact?
  60.  
  61.     We can prove it, as follows:
  62.  
  63.             ---<>---
  64.  
  65.     Lemma 1:  a(n) = tan(2^(n-1) atan(a(1)))
  66.  
  67.     Proof:  Induction on positive integer n, using the formula for
  68.     tan(2x).
  69.  
  70.             ---<>---
  71.  
  72.     Lemma 2:  Redefine sign(x) to
  73.  
  74.         sign(x) =       1       if x >= 0
  75.                         0       if x < 0
  76.  
  77.     does not affect the value of v.  (The redefined sign(x) simplifies
  78.     later arguments).
  79.  
  80.     Proof:  The redefined sign(x) disagrees with the old sign(x) only at
  81.     x = 0.  Thus v would be disturbed only if a(n) = 0 for some positive
  82.     integer n.  But this never happens (exercise).
  83.  
  84.             ---<>---
  85.  
  86.     Lemma 3:  Let n be a positive integer and r a nonnegative real.  Let
  87.     d(n, r) be the nth digit after the point in the zero-extended binary
  88.     expansion of r.  Then
  89.  
  90.         d(n, r) =       0       if floor(2^n r) is an even integer
  91.                         1       if floor(2^n r) is an odd integer.
  92.  
  93.     Proof:  Exercise.
  94.  
  95.             ---<>---
  96.  
  97.     Theorem:
  98.  
  99.              inf
  100.              ---  sign(a(i))
  101.              >    ----------  =  1 - atan(a(1))/pi
  102.              ---     2^i
  103.             n = 1
  104.  
  105.     Proof: We have
  106.  
  107.           sign(a(n)) = 1
  108.  
  109.     <==>  a(n) >= 0
  110.  
  111.     <==>  tan(2^(n-1) atan(a(1))) >= 0
  112.  
  113.     <==>  2^(n-1) atan(a(1))  in  [ pi k, pi k + pi/2 )
  114.         for some integer k
  115.  
  116.     <==>  2^n atan(a(1))/pi  in  [ 2k, 2k + 1 )
  117.         for some integer k
  118.  
  119.     <==>  floor(2^n atan(a(1))/pi) = 2k
  120.         for some integer k
  121.  
  122.     <==>  floor(2^n atan(a(1))/pi) is an even integer
  123.  
  124.     <==>  d(n, atan(a(1))/pi) = 0
  125.  
  126.     so that
  127.  
  128.     sign(a(n)) =     1    if d(n, atan(a(1))/pi) = 0
  129.                 0    if d(n, atan(a(1))/pi) = 1
  130.  
  131.            = 1 - d(n, atan(a(1))/pi).
  132.  
  133.     But then
  134.  
  135.      inf                 inf                
  136.      ---  sign(a(i))     ---  1 - d(n, atan(a(1))/pi)    
  137.      >    ----------  =  >    ----------------------  
  138.      ---     2^i         ---          2^i        
  139.     n = 1               n = 1
  140.  
  141.               = 1 - atan(a(1))/pi.
  142.  
  143.     Letting a(1) = 1/2 solves the problem as posed.
  144.  
  145. > 2)  Are the distribution of binary digits of v random ?
  146.  
  147.     Normally, I leave sick questions like these to Bob Silverman.
  148.  
  149. > 3)  Can we find another formula that will give the decimal digits of 1/Pi ?
  150.  
  151.     Suppose we wish to generate the binary digits of
  152.  
  153.     v = k/pi
  154.  
  155.     where 0 < k < pi is rational, using the above recursion for a(n).
  156.     We must then have
  157.  
  158.          1 - atan(a(1))/pi = k/pi
  159.  
  160.     ==>  atan(a(1)) = pi - k
  161.  
  162.     ==>  a(1) = tan(pi - k) = -tan(k)
  163.  
  164.     Since k is a positive rational, tan(k) is irrational (deep number
  165.     theory) and so a(1) is irrational.  Rational a(1) is presumably
  166.     an important prerequisite for this algorithm.  In my estimation,
  167.     bases other than binary will suffer from the same limitation.
  168.  
  169.     Generating the decimal digits of atan(1/2)/pi, however, is probably
  170.     possible.  You would have to modify the recursion for a(n) to
  171.  
  172.     a(n+1) = tan(atan(10 a(n)))
  173.  
  174.     with the right side expanded to a rational function of a(n).
  175.     the sign(x) function would have to be modified to return a digit
  176.     between 0 and 9, selected according to the signs of p(x), where
  177.     p is one of nine polynomials satisfied by tan(2*pi*k/10) for
  178.     integer 1 <= k <= 9.  Good luck.
  179.  
  180. > 4)  Can the formula be used to calculate v efficiently ?
  181.  
  182.     Probably not.  If floating point numbers are used for a(n), rounding
  183.     errors quickly undermine the accuracy.  If integer pairs are used
  184.     as a rational description of a(n), their bit-length approximately
  185.     doubles each time n is incremented, which means that only a few
  186.     (many fewer than 100) digits could be calculated in a lifetime
  187.     on existing hardware.
  188.  
  189. -- 
  190. David W. Wilson (wilson@web.ctron.com)
  191.  
  192. Disclaimer: "Truth is just truth...You can't have opinions about truth."
  193. - Peter Schikele, introduction to P.D.Q. Bach's oratorio "The Seasonings."
  194.