Longest Collatz sequence | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Longest Collatz sequence

Which starting number, under 10,000, produces the longest chain? NOTE: Once the chain starts the terms are allowed to go above 10,000. What do you think? worthy? https://code.sololearn.com/cvJ37F0fa2Io/?ref=app

25th Sep 2019, 1:44 PM
mr_Ef
mr_Ef - avatar
1 Answer
- 1
Under 2,500,000 it's 2,298,025 with 559 iterations. https://code.sololearn.com/cTrFw7PNJuaB/?ref=app
25th Sep 2019, 2:14 PM
Diego
Diego - avatar