Question: please solve by mathematica 1. Consider the following process. Begin with a positive integer x. If x is even, replace x by x/2. If x

 please solve by mathematica 1. Consider the following process. Begin with

please solve by mathematica

1. Consider the following process. Begin with a positive integer x. If x is even, replace x by x/2. If x is odd, replace x by 3x + 1. The Collatz Conjecture asserts that if we begin with any positive integer x and repeat this process enough times, we will eventually reach the value of 1. For example, if we start with 7 and repeat the Collatz process 20 times, we find the following numbers. This list was produced using the function NestList. {7,22,11,34,17,52,26,13,40, 20,10,5,16,8,4,2,1,4,2,1,4} Define a function "coll in Mathematica that is equal to the Collatz function. For example, input 7 produces output 22, and input 22 produces output 11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!