Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
9-liner: easily up to 10**10000 solution in Speedy category for Ulam–Warburton Automaton by StefanPochmann
def automaton(step: int) -> int:
total = 0
mul = 1
while step:
m = step.bit_length() - 1
total += mul << (2*m)
step -= 1 << m
mul *= 3
return total * 4 // 3
March 15, 2023
Comments: