# Turn on typeset mode %typeset_mode True
# Define a power series a(n) = x^n/2^n
# Define partial sums - note the 0!!! def s(k): return sum([a(i) for i in [0..k]])
s(5)
321x5+161x4+81x3+41x2+21x+1
# Plot s(5) from -5 to 5 plot(s(5), (-5,5))
# Plot a bunch of partial sums plot(s(0))+plot(s(1))+plot(s(2))
# Quicker method sum([plot(s(i),(-5,5)) for i in range(0,5)])