collatz

版本 1.0.1 (19.7 KB) 作者: Edgar Guevara
Checks for the Collatz conjecture for a given number
15.0 次下载
更新时间 2019/12/16

This function checks for the Collatz conjecture for a given number.
It can be customized to check other variants different to 3n+1
Takes a number n. If it’s even, divide by 2. If it’s odd, multiply by 3 and add 1. Repeat. Do all starting numbers lead to 1?

引用格式

Edgar Guevara (2024). collatz (https://github.com/guevaracodina/collatz), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2017b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Variables 的更多信息

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.1

updated logo

1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库