image thumbnail

Simple Collatz conjecture

version 1.0.0 (27 KB) by Ali Talal Mohammad Budebs
Simple for loop for Collatz Conjecture


Updated 02 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 (2022). 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!