Simple Collatz conjecture
Version 1.0.0 (27 KB) by
Ali Talal Mohammad Budebs
Simple for loop for Collatz Conjecture
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 LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |