https://github.com/ratwolfzero/collatz_bigint_file
Program to calculate the Collatz sequence for very large integers. Using crate BigInt.
https://github.com/ratwolfzero/collatz_bigint_file
collatz-conjecture collatz-sequences hailstone-numbers syracuse-problem unsolved-problems
Last synced: 3 months ago
JSON representation
Program to calculate the Collatz sequence for very large integers. Using crate BigInt.
- Host: GitHub
- URL: https://github.com/ratwolfzero/collatz_bigint_file
- Owner: ratwolfzero
- License: mit
- Created: 2024-12-27T22:12:34.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-01-06T23:45:05.000Z (6 months ago)
- Last Synced: 2025-02-14T19:39:20.351Z (5 months ago)
- Topics: collatz-conjecture, collatz-sequences, hailstone-numbers, syracuse-problem, unsolved-problems
- Language: Rust
- Homepage: https://github.com/ratwolfzero/collatz_bigint_file
- Size: 7.89 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.