Home

sumk0

Sumk0 is a term used in mathematics and computer science to denote a summation over a sequence with the index starting at zero. It is not a universally standardized operator, but appears as a descriptive label in documentation and code where the lower bound 0 must be explicit.

Definition: For a function f defined on non-negative integers and an upper limit n ≥ 0, the sumk0

Examples: sumk0 of f(k)=k up to n yields n(n+1)/2. If f(k)=1, the result is n+1. If f(k)=r^k

Properties: Linearity: sumk0(f(k)+g(k)) = sumk0 f(k) + sumk0 g(k). Change of variables and summation indices can shift the

Implementation: In code, a typical implementation uses a loop from 0 to n, or uses built-in sum

See also: sigma notation, summation, discrete mathematics, arithmetic series, geometric series.

of
f
up
to
n
is
the
sum
from
k=0
to
n
of
f(k).
This
can
be
written
as
sum_{k=0}^{n}
f(k).
In
programming
contexts,
it
may
be
expressed
as
sumk0(f,
n)
or
simply
as
a
loop
that
iterates
k
from
0
to
n
and
accumulates
f(k).
with
r
≠
1,
the
result
is
(1−r^{n+1})/(1−r).
starting
point,
and
many
standard
results
for
sigma
notation
apply
to
sumk0
where
appropriate.
with
a
range
starting
at
0.
Some
libraries
expose
sumk0
as
a
dedicated
function
alias
for
sum_{k=0}^{n}
f(k).