1 | initial version |

You can always do

```
sage: dings = [1 , 2, 3, 4, 5]
sage: length = len(dings)
sage: sum([1/dings[k] for k in range(length)])
```

or

```
sage: var('k')
sage: d(k) = 1/k # defines d to be a (symbolic) function
sage: sum(d(k), k, 1, 5)
```

The second version works more generally:

```
sage: var('k')
sage: d(k) = 1/k^2
sage: sum(d(k), k, 1, infinity)
1/6*pi^2
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.