Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Jupyter notebook 2017-04-10-174302.ipynb

Views: 46
Kernel: Python 2 (Ubuntu Linux)
import numpy as np #Recurrence Relations for Tower of Hanoi up till the N-th term a=input('Initialization for u[0]: ') N=50; u=np.zeros((N,1), dtype=np.int); u[0]=a; for n in range(0,N): u[n]=2*u[n-1]+1; print(u)