import numpy as np
import scipy.integrate as integr
import matplotlib.pyplot as plt

def suite(n):
    a=1
    b=1
    for k in range(2,n+1):
        a,b=b,b+2/k*a
        print(k,'->',b/a)
    return

def f(y, x):
    return (2*x+1)/(1-x)*y

n=100
suite(n)

Lx=np.arange(0,.7,.01)
Ly=integr.odeint(f, 1, Lx)
plt.plot(Lx,Ly)
plt.grid()
plt.show()
