Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ralphtheninja/collatz-series
- Owner: ralphtheninja
- Created: 2017-04-18T16:38:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T16:43:07.000Z (over 7 years ago)
- Last Synced: 2024-12-27T17:39:53.884Z (13 days ago)
- Topics: collatz-conjecture, mathematics, series
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)