Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
5-liner: fstring solution in Clear category for Ulam–Warburton Automaton by przemyslaw.daniel
def automaton(steps: int) -> int:
result = 0
for k in range(steps):
result += 3 ** sum(map(int, f"{k:b}"))
return max(0, (4 * result - 1) // 3)
Feb. 1, 2023
Comments: