Ask Your Question

Double sum

asked 2012-11-26 15:41:27 +0200

PB gravatar image


I would like SAGE to compute a double sum like $\sum\limits_{1\le a\le n}\sum\limits_{1\le b\le n} \max(a,b)$. The result is strange :


SAGE tells me that f(2) is 6. But it is rather 7 (unless i am very tired).

Thank you for your advices :-)


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-11-26 16:29:34 +0200

kcrisman gravatar image

In this case you may want to try max_symbolic. Try max(a,b) by itself and see what you get - maybe a?

edit flag offensive delete link more

answered 2012-11-26 16:48:26 +0200

PB gravatar image

Thank you. You are right : max(a,b) gives me a. I used max_symbolic instead, I get no error, but SAGE can't simplify the double sum.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-11-26 15:41:27 +0200

Seen: 1,157 times

Last updated: Nov 26 '12