Question: add sequence in Maple

Dear Mapleprimes,

 

I'm trying to add a sequence of numbers using the add command. It appears that it can only add up to a specific number. The following works:

 

add(2*i, i=1..5)

 

gives 30.

 

But it is not possible to do:

 

add(2*i, i=1..n)

 

such that n is a parameter.

 

Does anyone know how to add a finite series of values where n is unknown?

 

Cheers,

 

Christian

Please Wait...