mojotx / collatz-c

C code for playing with the mathematical problem, the Collatz Conjecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collatz Conjecture

Overview

From Wikipedia: Collatz Conjecture

The Collatz conjecture is a famous unsolved mathematical problem. Ihe conjecture asks whether repeating two simple arithmetic operations will eventually transform every positive integer into 1. It concerns sequences of integers in which 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 these sequences always reach 1, no matter which positive integer is chosen to start the sequence.

It is named after mathematician Lothar Collatz, who introduced the idea in 1937, two years after receiving his doctorate. It is also known as the 3n + 1 problem, the 3n + 1 conjecture, the Ulam conjecture (after Stanisław Ulam), Kakutani's problem (after Shizuo Kakutani), the Thwaites conjecture (after Sir Bryan Thwaites), Hasse's algorithm (after Helmut Hasse), or the Syracuse problem. The sequence of numbers involved is sometimes referred to as the hailstone sequence, hailstone numbers or hailstone numerals (because the values are usually subject to multiple descents and ascents like hailstones in a cloud), or as wondrous numbers.

This is my toy code for playing with the problem, written in C

Installation

In progress...

Example

In progress...

License

Licensed under the MIT License. If you find this useful or interesting, great!

About

C code for playing with the mathematical problem, the Collatz Conjecture

License:MIT License


Languages

Language:C 80.4%Language:Makefile 19.6%