is it correct for 35197? Im getting 5001 instead of inf.
I also get 5001.
10016 and 10081 have another valid answer: 1251 (besides 626). The problem should accept them or request the minimum exponent.
Return the 3n+1 sequence for n
6210 Solvers
1274 Solvers
Number of 1s in the Binary Representation of a Number
359 Solvers
177 Solvers
520 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!