/Collatz-sequence

Half Or Triple Plus One

Primary LanguageJavaBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Collatz-sequence

Collatz sequence: Take any positive integer n. If n is even, divide it by 2 to get n / 2. If n is odd, multiply it by 3 and add 1 to obtain 3n + 1. Repeat the process indefinitely.

Collatz conzecture states that

Collatz sequence eventually reach 1 for all positive integer initial values

In this repo, there are programs to generate and play with collatz sequence.

XKCD on Collatz conzecture