Question: Code in Python please withtve output 2-1-B Syracuse Conjecture Douglas Hofstadter's Pulitzer-prize-winning book, Gdel, Escher, Bach, poses the following mathematical puzzle on pages 400-401. 1.

 Code in Python please withtve output 2-1-B Syracuse Conjecture Douglas Hofstadter's Code in Python please withtve output

2-1-B Syracuse Conjecture Douglas Hofstadter's Pulitzer-prize-winning book, Gdel, Escher, Bach, poses the following mathematical puzzle on pages 400-401. 1. Pick a positive number n 2. If n is even, divide it by 2. 3. If n is odd, multiply it by 3 and add 1 4. Continue this process until n is 1. The number n will travel up and down but eventually end at 1 (at least for all numbers that have ever been tried-nobody has ever proved that the sequence will always terminate) The sequence of values of n is sometimes called a Hailstone sequence, because hailstones also travel up and down in the atmosphere before falling to earth. It is also called the 3n+1 problem; Collatz conjecture; Ulam conjecture; Kakutani's problem; Thwaites conjecture; Hasse's algorithm; or the Syracuse problem. Write a function that takes a single argument with formal parameter name n, prints out the hailstone sequence starting at n, and returns the number of steps in the sequence. For a demo, use 5: show the steps in Online Text. Then, determine how many steps 27 takes and paste just the number of steps in Online Text. For ten points extra credit, do one of the following: 1. Prove the Conjecture that ALL numbers eventually reach 1 2. Disprove the Conjecture. The simplest way to do this is to provide just one counter-example. For 100 points, provide BOTH proofs. Submission status

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!