home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / sci / math / 17913 < prev    next >
Encoding:
Internet Message Format  |  1993-01-10  |  2.4 KB

  1. Path: sparky!uunet!wupost!udel!gatech!swrinde!network.ucsd.edu!galaxy!ucrmath!tadpole
  2. From: tadpole@ucrmath.ucr.edu (tad white)
  3. Newsgroups: sci.math
  4. Subject: Re: Closed forms for sums
  5. Summary: Mathematica code
  6. Message-ID: <24833@galaxy.ucr.edu>
  7. Date: 10 Jan 93 08:47:40 GMT
  8. References: <964.165.uupcb@hal9k.ann-arbor.mi.us>
  9. Sender: news@galaxy.ucr.edu
  10. Organization: University of California, Riverside
  11. Lines: 64
  12. Nntp-Posting-Host: ucrmath
  13.  
  14. In article <964.165.uupcb@hal9k.ann-arbor.mi.us> james.jones@hal9k.ann-arbor.mi.us (James Jones) writes:
  15. * OB>Subject: sum(i=1 to n, i^3) = ??   URGENT !!
  16. * While we're on the subject, I was killing some time with Derive, a
  17. * Mathematical Assistant one day waiting form my Finite class to begin
  18. * and found the closed form for
  19. *         ---
  20. *         \     j
  21. *          >   i
  22. *         /
  23. *         ---
  24. *         i=1
  25. * where j went from 1 to about 12 or 13.  Can't remember exactly where I
  26. * stopped at.
  27. [ some formulas included...]
  28.  
  29. Mathematica doesn't seem to have them built-in either, and I needed
  30. them for my calculus course last quarter.  So here's Mathematica code
  31. for them, with a sample.
  32.  
  33. -----
  34. a[k_, n_] := (a[k,n] = Together [ 1/(k+1) ( (n+1)^(k+1) - 1 - 
  35.    Sum[ Binomial[k+1,j] a[j,n], {j,0,k-1}])] ) /; k > 0;
  36.  
  37. a[0,n] := n;
  38.  
  39. a::usage = "a[k,n] returns a closed-form expression for 1^k+2^k+...+n^k,
  40. when n >= 0 (possibly symbolic) and k is a fixed non-negative integer."
  41. -----
  42.  
  43. In[2]:= a[3,n]
  44.  
  45.          2      3    4
  46.         n  + 2 n  + n
  47. Out[2]= --------------
  48.               4
  49. -----
  50.  
  51. [ Perhaps some motivation... Look at the integer points in
  52. the (k+1)-dimensional cube of size n+1.  Assign to each point
  53. the number of distinct values taken by its coordinates.  For
  54. example, if k=1, we have something like this:
  55.  
  56.         2 2 2 1
  57.         2 2 1 2
  58.         2 1 2 2
  59.         1 2 2 2
  60.  
  61. Then 1's occur along the (strong) diagonal; 2's occur in a union of
  62. triangles (exercise: how many?); 3's in a union of tetrahedra, and so
  63. forth.  In this way you write (n+1)^(k+1) as a union of the numbers in
  64. question, and the recurrence relation falls out.]
  65.  
  66. Hope this helps.  --tad
  67.  
  68. By the way, I'm not sure there's a standard terminology for these numbers
  69. (triangular, tetrahedral, ...)?  Perhaps "simplicial numbers" is apt?
  70. -- 
  71. /********************************************************\
  72. *  Tad White                  UCR Dept. of Mathematics  *      
  73. *  tadpole@ucrmath.ucr.edu    Riverside, CA  92521      *
  74. \********************************************************/
  75.