wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> general problem-solving / chatting / whatever >> Messy sum of sums
(Message started by: jarls on Aug 30th, 2009, 12:23am)

Title: Messy sum of sums
Post by jarls on Aug 30th, 2009, 12:23am
Why does this turn out to be a fraction (not just for displayed values)?



Title: Re: Messy sum of sums
Post by towr on Aug 30th, 2009, 1:33am
Because you're adding a finite number of rational numbers.

Title: Re: Messy sum of sums
Post by Obob on Aug 30th, 2009, 5:21am
It seems to me you probably have an error in there, though.  One of the terms is (d-(p-1))!, where the range p is evaluated over makes d-(p-1) negative most of the time.  There is no good interpretation for the factorial of a negative number.  This should raise a red flag, unless you are absolutely sure this is intended.

In fact, if it wasn't for the last term, you would get an integer for all positive integer inputs.

Title: Re: Messy sum of sums
Post by Eigenray on Sep 3rd, 2009, 3:35pm
n! may not be defined for n a negative integer, but 1/n! can be taken to be 0; e.g., C(n,k) = n!/(k! (n-k)!) even if k<0 or k>n.  The problem seems to be the kd-l in the third sum: since l can be as large as d+3, you can get a denominator of k3.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board