import numpy as np
import math
import matplotlib.pyplot as plt   #jupyter では %matplotlib inline が必要
oto_length=[]
oto_length_temp=1

harmonic_overtone=3
repeat_number =36

for i in range(repeat_number):
    oto_length_temp=oto_length_temp*1/harmonic_overtone
    while oto_length_temp<1/2:
        oto_length_temp=oto_length_temp*2
    oto_length.append(oto_length_temp)

plt.plot(oto_length)
plt.show()