The Collatz conjecture is a mathematical problem that predicts that any positive integer will eventually converged to 1, if odd numbers is multiplied by 3 and added 1, else even numbers divided by 2.
22sec が 18sec に短縮されました。 約18% 減少です。 除算を避けると、やっぱり違うんですね。 ついでに。 この方法だと「is_collatz(N)」では、すでに「N-1」まで検証済みであるわけで、「N-1」以下になったら検証不要です。 というロジックにしてみました。
There was an error while loading. Please reload this page. A Python script to test whether an integer input behaves in accordance with the Collatz Conjecture. The ...
There was an error while loading. Please reload this page. The Collatz Conjecture Toolkit is a lightweight Python project for exploring the famous Collatz sequence ...