Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » sum » sum(ZZ,Function)
next | previous | forward | backward | up | index | toc

sum(ZZ,Function) -- sum consecutive values of a function

Description

sum(n,f) computes the sum f(0) + f(1) + ... + f(n-1).

i1 : sum(10, i -> i^2)

o1 = 285

See also

Ways to use this method:


The source of this document is in Macaulay2Doc/functions/sum-doc.m2:75:0.