(10 pts)
Let be an integer. We can make a new integer as follows:
if is even, then
if is odd, then
Repeating this, we obtain a sequence of integers . Here is and example of such a sequence starting with :
Collatz conjecture says, that no matter what the first integer is, this sequence will always reach the number 1. After that the sequence will start repeating:
This conjecture has been around for 90 years, but It is still not known if it is true or not. The goal of this project is to investigate sequences obtained in this way and make some observations about them.
Here is some terminology:
A Collatz sequence is a sequence obtained as above, where , and it is the first occurence of 1 in this sequence.
The stopping time of a Collatz sequence for an integer is the length of the Collatz sequence .
The peak of a Collatz sequence is the largest integer in that sequence.
Project¶
Explore Collatz sequences and make some observations about them. Here are some ideas you may want to consider. Do not research all these suggestions, just pick a few. You can also choose entirely different questions that you find interesting.
Find examples of some interesting Collatz sequences (e.g. especially long or short or with a very high peak compared to the starting number, etc.). Plot these sequences and make some observations about them.
Plot stopping times for numbers up to some integer
n. What do you see in the plot? Zoom in on some interesting areas.For an integer
n, compute the average stopping time of all numbers smaller thann. How is this average changing withn? What about the maximum stopping time for numbers smaller thann?Which numbers give the shortest Collatz sequences? What about numbers that are immediately preceeding or succeding these numbers?
Sometimes several consecutive numbers have the same stopping times. Find some examples of such numbers. How different are Collatz sequences for such numbers? Do they share a lot of numbers or are they mostly different?
In Collatz sequences starting an integer smaller than
n, on average what is the fraction of steps that
increase the sequence? How does this change withn?For a given integer
n, what are the biggest and the average values of peaks of sequences starting withk, forksmaller thann? How does this change asnincreases?Let
peak(k)denote the peak of the Collatz sequence that starts withk. Compute ratiospeak(k)/k. What is the average of these ratios for allksmaller than somen? How does it change withn? How often does this ratio exceeed 10? 100? 1000?How many steps does it take for the Collatz sequence staring with
nto reach its peak? How does it change withn?For a given number
n, how many integers are there with the stopping time less thann? How does it change withn?