Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- def colloratz(numb):
- if numb%2==0:
- return (numb/2)
- else:
- return (3*numb+1)
- vec = []
- for numb in xrange(2,10*3):
- cnt=0
- while numb is not 1:
- numb=colloratz(numb)
- cnt+=1
- vec.append(cnt)
- np.histogram(vec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement