The Collatz conjecture states that for any positive integer ( n ):
If ( n ) is even, divide it by 2 (i.e., ( n \to \frac{n}{2} )).
If ( n ) is odd, multiply it by 3 and add 1 (i.e., ( n \to 3n + 1 )).
Other Collatz conjecture approach
![](https://media.dev.to/cdn-cgi/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1702535%2F83cde4fa-cb2b-4e2a-8f14-4b9cbbc3ba77.jpg)
The Collatz conjecture states that for any positive integer ( n ):
If ( n ) is even, divide it by 2 (i.e., ( n \to \frac{n}{2} )).
If ( n ) is odd, multiply it by 3 and add 1 (i.e., ( n \to 3n + 1 )).