Home

sumk0N1

Sumk0N1 is a compact informal name for the finite sum with lower bound k = 0 and upper bound k = N − 1. In mathematics this is written as sum_{k=0}^{N-1} f(k), where f is a function defined on the nonnegative integers up to N−1. The term "sumk0N1" appears in notes or programming contexts as a shorthand for this summation range without writing the full expression.

Definition and scope: Let N be a nonnegative integer and f be defined on {0,1,...,N−1}. The sum

Key properties: The summation operator is linear: sum_{k=0}^{N-1} [a f(k) + b g(k)] = a sum_{k=0}^{N-1} f(k) + b

Geometric examples: sum_{k=0}^{N-1} r^k = (1 − r^N)/(1 − r) for r ≠ 1. In algorithms and analysis, these sums

See also: finite sum, summation notation, arithmetic series, geometric series, index notation, discrete mathematics.

equals
the
aggregate
of
f(k)
as
k
runs
from
0
to
N−1.
If
N
=
0,
the
index
set
is
empty
and
the
sum
is
defined
as
0.
This
finite
sum
is
a
fundamental
construct
in
discrete
mathematics,
combinatorics,
and
computer
science.
sum_{k=0}^{N-1}
g(k).
Index
shifting
allows
reindexing:
sum_{k=0}^{N-1}
f(k)
=
sum_{j=0}^{N-1}
f(j).
Also,
closed
forms
exist
for
many
simple
f.
For
example,
sum_{k=0}^{N-1}
1
=
N,
sum_{k=0}^{N-1}
k
=
N(N−1)/2,
and
sum_{k=0}^{N-1}
k^2
=
(N−1)N(2N−1)/6.
help
estimate
running
times,
derive
series
identities,
and
simplify
recurrences.
When
N
is
large,
a
closed
form
is
usually
preferable
to
iterative
summation.