An open API service indexing awesome lists of open source software.

https://github.com/void4main/collatz-conjecture

Get to understand the Collatz conjecture
https://github.com/void4main/collatz-conjecture

collatz conjecture simple

Last synced: about 2 months ago
JSON representation

Get to understand the Collatz conjecture

Awesome Lists containing this project

README

        

# Collatz conjecture / 3n+1 Problem

```js
gcc -O4 -o collatz-conjecture collatz-conjecture.c
```

**Example output to console:**

```js
Start: 3 End: 1 Steps: 7
Start: 6 End: 1 Steps: 8
Start: 7 End: 1 Steps: 16
Start: 9 End: 1 Steps: 19
Start: 18 End: 1 Steps: 20
Start: 25 End: 1 Steps: 23
Start: 27 End: 1 Steps: 111
Start: 54 End: 1 Steps: 112
Start: 73 End: 1 Steps: 115
Start: 97 End: 1 Steps: 118
...
Start: 12235060455 End: 1 Steps: 1184
...
```