Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ratwolfzero/collatz_bigint_file
Calculate and display the Collatz sequence (3n+1 problem) for very large integers by handling the sequence via a file on disk
https://github.com/ratwolfzero/collatz_bigint_file
collatz-conjecture collatz-sequences hailstone-numbers syracuse-problem unsolved-problem
Last synced: 15 days ago
JSON representation
Calculate and display the Collatz sequence (3n+1 problem) for very large integers by handling the sequence via a file on disk
- Host: GitHub
- URL: https://github.com/ratwolfzero/collatz_bigint_file
- Owner: ratwolfzero
- Created: 2023-10-03T04:16:46.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-19T05:13:45.000Z (5 months ago)
- Last Synced: 2024-06-19T12:51:55.830Z (5 months ago)
- Topics: collatz-conjecture, collatz-sequences, hailstone-numbers, syracuse-problem, unsolved-problem
- Language: Rust
- Homepage:
- Size: 24.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# collatz_bigint_file
same as big_int but will write and read the collatz sequence to/from a file "collatz_sequence.txt" to avoid system memory overflow when operating with extremly large integers.
With this program I was able to compute 2^100000-1 in about 2 hours and 15 minutes. Size of "collatz_sequence.txt" was 35.2 GB. In this case I did not print the sequence in the terminal and only caluated the statistics.Don't forget to adopt the constant with the path where to save the file collatz_sequence.txt.