PROJECT EULER · #0014
Longest Collatz Sequence
The following iterative sequence is defined for the set of positive integers:
( is even) ( is odd)
Using the rule above and starting with
It can be seen that this sequence (starting at
Which starting number, under one million, produces the longest chain?
NOTE: Once the chain starts the terms are allowed to go above one million.
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.