Collatz Sequence is a sequence in which after initial value (n) the next value is n/2 if n is even or 3n+1 if n is odd. The sequence continues until the value is 1. In this program the user can either input a value, see the sequence and its length or user can see the longest Collatz Sequence with an initial value that is under 1 million. The question is from Project Euler (Problem #14)
This program was used to create graphs of the Collatz Conjecture. There are variables to change the formula to different numbers than 3x+1 and /2. My finding was that 3x+1 and /2 graphs are essentially the same as x+1 and /2 graphs, but spikier.
The goal of this personal project was to develop a script that will attempt to solve the Collatz conjecture, also known as the Syracuse problem. This personal challenge was developed, tested and optimized in less than 2 hours.
An interactive python based program for hailstone sequence calculation, the numbers that increase and decrease but eventually settles into a repeating pattern of the numbers 4, 2, 1. The sequence is generated by starting with any positive whole number greater than zero. Also plot graphs which reveals the true beauty of conjecture
My Collatz Conjecture based PRNG. It takes advantage of the geometric Brownian motion of the sequence for a given seed and uses a small enough step count that the overall trend is irrelevant (i.e. no 4,2,1 loops).