johnnynalley / collatz_conjecture

The Collatz Conjecture is a mathematical conjecture where if you enter any integer into the program, it will be divided by half or multiplied by 3 however many times it takes to reach 1, depending on if the number is even or odd..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collatz Conjecture

Info

From Wikipedia:

The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined as follows: start with any positive integer n. Then each term is obtained from the previous term as follows: if the previous term is even, the next term is one half of the previous term. If the previous term is odd, the next term is 3 times the previous term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.

About

The Collatz Conjecture is a mathematical conjecture where if you enter any integer into the program, it will be divided by half or multiplied by 3 however many times it takes to reach 1, depending on if the number is even or odd..


Languages

Language:Python 100.0%