Created by cahier-indice-algo-1gen
Created on April 22, 2022
190 Bytes
def syracuse(a): u = a k = 0 while u != 1: if u % 2 == 0: u = u / 2 else: u = 3 * u + 1 k = k + 1 return k