-
Notifications
You must be signed in to change notification settings - Fork 0
kgengler/Collatz-Conjecture-Steps
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This code is public domain A simple c program to calculate the number of steps needed to reach 1 using the Collatz Conjecture. See https://en.wikipedia.org/wiki/Collatz_conjecture for more information. compile: make You can test multiple numbers at once with a simple loop. e.g. in bash the following will compute until ctrl-c is pressed (assuming you compiled using the above example): i=1; while true; do collatz $i; let 'i = i + 1'; done Fun fact, the largest number of steps needed to find 1 in the numbers between 1 and 10,000 is 351; the number is 77031.
About
Calculate the number of steps needed to reach the integer 1 using Collatz Conjecture.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published