Simple Collatz conjecture

Simple for loop for Collatz Conjecture
25 Downloads
Updated 2 Aug 2021

View License

Simple for Loop to check the Collatz Conjuncture.
Takes a number x. If it’s even, divide x by 2. If it’s odd, multiply x by 3 and add 1 to the product. Repeat until it reaches 1 do that the loop doesnt las forever

Cite As

Ali Talal Mohammad Budebs (2024). Simple Collatz conjecture (https://www.mathworks.com/matlabcentral/fileexchange/96952-simple-collatz-conjecture), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0