I should add that moving the part where I assign values to the u's to above 
the definition of gamma, like so:
reset()
var("G")
var('i')
G = 5
u = [SR("u_%i"%x) for x in [0..G-1]]
u[1] = -1
u[2]= -1
u[3]= -1
u[4]= -1
gamma(k) = (1/G)*sum(-(u[i])^(k-1)/(u[i]-1)^k for i in (1..G-1))
show(1/5 - 3*2/5 + 3*gamma(2) - gamma(3))

Fixes the issue. But, I feel like there must be a more elegant solution. Is 
there any way to do this as more of a function? Here is how mathematica 
does it:

Enter code here...


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to