Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ralphtheninja/collatz-series

Calculates the Collatz series, given a positive integer
https://github.com/ralphtheninja/collatz-series

collatz-conjecture mathematics series

Last synced: 9 days ago
JSON representation

Calculates the Collatz series, given a positive integer

Awesome Lists containing this project

README

        

# collatz-series

Calculates the Collatz series given a positive integer.

### api

```js
const collatz = require('collatz-series')
console.log(collatz(44))
// [ 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1 ]
```

### links

* [Wikipedia](https://en.wikipedia.org/wiki/Collatz_conjecture)
* [Numberphile](https://www.youtube.com/watch?v=LqKpkdRRLZw)