Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use MATLAB 5. Consider a sequence {ao, Quay, ...), where a, is some natural number and an+1 = 14./2, if a, is even, 13an +

use MATLAB image text in transcribed
5. Consider a sequence {ao, Quay, ...), where a, is some natural number and an+1 = 14./2, if a, is even, 13an + 1, if a, is odd. For example, if a = 3, then we have (3, 10, 5, 16, 8, 4, 2, 1.4.2.1... and if a. = 9. then (9.28. 14. 7. 22, 11. 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4. 2. 1.4.2.1...). In fact, as far as we know, the sequence eventually reaches I starting from any natural number in other words, there is no known counterexample). On the other hand, the statement that it reaches I for all natural numbers, known as the Collatz conjecture, is one of the great unsolved problems in mathematics (see, for example, "Collatz conjecture in Wikipedia) Write a function with header (period, a_max] - mycollatz (ac), where period is the length of the sequence before it reaches the first and a max is the maximum number in this sequence. For example: [period, a_max] - myCollat2(9) period - 19 a max- 52 Use your function with the input a sum (myvec)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

2. To compare the costs of alternative training programs.

Answered: 1 week ago