subject
Engineering, 26.10.2019 00:43 ParallelUniverse

The collatz conjecture: the collatz conjecture, also known as the 3n+1 conjecture (and other names), deals with the following operation to produce a sequence of numbers. given a number, n, if n is even then the next number is n divided by 2. if n is odd, then the next number is 3n+1. the collatz conjecture is that this sequence of numbers always eventually reaches 1. as simple as this seems, it is unproven (and considered extremely hard to prove) by mathematicians. as an example of a sequence, if you start with the number 6, then the terms of the sequence will be: 6, 3, 10, 5, 16, 8, 4, 2, 1.write a program that takes in a positive integer from a user, and computes the collatz sequence, printing out all the numbers in the sequence, followed by a line stating how many iterations it took to reach the value 1.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 08:10
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 18:10
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
A-mn has a cubic structure with a0 0.8931 nm and a density of 7.47 g/cm3. b-mn has a different cubic structure, with a0 0.6326 nm and a density of 7.26 g/cm3. the atomic weight of manganese is 54.938 g/mol and the atomic radius is 0.112 nm. determine the percent volume change that would occur if a-mn transforms to b-mn.
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following refers to refers to how well the control system responds to sudden changes in the system. a)-transient regulation b)- distributed regulation c)-constant regulation d)-steady-state regulation
Answers: 1
You know the right answer?
The collatz conjecture: the collatz conjecture, also known as the 3n+1 conjecture (and other names),...
Questions
question
Mathematics, 15.06.2021 01:00
Questions on the website: 13722363