Question: Please solve by MATLAB. 1. The 3N+1 problem is a relatively simple, but yet still unsolved problem in Mathematics. A series of integer numbers is
Please solve by MATLAB.
1. The 3N+1 problem is a relatively simple, but yet still unsolved problem in Mathematics. A series of integer numbers is generated as follows 1) Start with an integer number N 2a) If N, is odd, compute a new number N+1 3N 1 2b) If Mi is even, compute a new number Mi+1 = M,/2. 3) Now use this new number N+1 at (1) and compute the next number, etc. For example: 11 34 17 52 26 13 40 20105168421. Hence, the number N-11 is mapped onto the number 1 in 14 steps. During this procedure a maximum of 52 is reached. The number N-1 is mapped onto itself in 3 steps: 4 2 It seems that every number N is eventually mapped onto the number 1. However, a general proof is not known, although many clever scientists have tried to prove the conjecture. (a) Compose a program that confirms the conjecture for N200 b) Compute for each number N the maximum obtained intermediate value, and the number of required steps to reach the number 1. Store these numbers in an array. Which N requires most steps? Which N reaches the highest intermediate value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
