Close

Optimizing Collatz Sequence with Dynamic Programming

Even though Kurtz and Simon proved that a natural generalization of the Collatz problem is algorithmically undecidable, it is still fairly easy to brute force the 3n+1 conjecture with large values of n and empirically see it converge. Project Euler's problem 14 queries about which starting number, under one million, produces the longest sequence? Since Premature optimization is often considered root…

Share