import matplotlib.pyplot as plt

def f(n):
    return n**2-1

l=[.5]
for a in range(30):
    x=f(l[-1])
    print(x)
    l.append(x)

plt.plot(l,'bo-')
plt.show()
