# How should I enter indexed terms? For example, constants $n_k$ for $k\in\{1,\,\ldots,\,N\}$

How should I enter

$\quad \quad \sum^{N}_{k=0}{f(n_k)}$

into Mathematica? More generally, how should I work with the indices?

Take the following as an example. I know how the Sum function works, but how to do get it to work with the $n_k$ in $\sum^N_{k=0}n_k$? Here is what I have:

Sum[n (ln (1 + e^(ax + y))), {n, 0, N}]


Note that the $n_k$ for $k\in{}\{0, 1, ..., N\}$ are unspecified constants (natural numbers if it matters).

I am trying to simplify a similar series.

• When you write Sum[n (ln (1 + e^(ax + y))), {n, 0, N}] above, do you intend Sum[n Log[1 + E^(a x + y)], {n, 0, N}]. I hope so, because in the first expression ln, ax, and e are ordinary variables with no special meaning. – m_goldberg Jul 23 '15 at 9:18

I suspect you want something more than this but I would start with Indexed:
Sum[f[Indexed[n, k]], {k, 0, Ν}]

Note that I replaced N, a reserved symbol, with \[CapitalNu] which looks the same but is free for use.
• How symbolic vector part functionality (Indexed) integrates with other functionalities, like geometric regions is somewhat poorly documented. It can be used like Minimize[Indexed[p, 1] - Indexed[p, 2], Element[p, Disk[]]] ... so, in some contexts Indexed has quite a specific meaning. – kirma Jul 23 '15 at 8:31