# This line makes the output nicely typeset %typeset_mode True

# Define a sequence a(n)=1/n

# Print a sequence [a(i) for i in [1..10]]

# Define a series (sequence of partial sums) def s(k): return sum([a(i) for i in [1..k]])

# Print a sequence of partial sums [s(i) for i in [1..10]]

# Plot a sequence L = [a(i) for i in [1..10]] list_plot(L, pointsize=50, color='green')

# Plot sequence of partial sums (i.e. partial sums in a series) S = [s(i) for i in [1..10]] list_plot(S, pointsize=50, color='red')

# Indefinite integral integral(1/x^2, x)

# Definite integral from 4 to 5 integral(1/x^2, x, 4, 5)

# Improper integral integral(1/x^2, x, 1, infinity)