Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import numpy as np

import matplotlib.pyplot as plt


import math
n=10
m=np.zeros([n,2])
p=0
for i in range(0,n):
g=1/16**i
a=4/(8*i+1)
b=2/(8*i+4)
c=1/(8*i+5)
d=1/(8*i+6)
k=g*(a-b-c-d)
p=p+k
m[i,0]=i+1
m[i,1]=p
print(m)
x=m[0:n-1,0]
y=m[0:n-1,1]
plt.plot(x,y)
plt.show()

You might also like