13.5k views
1 vote
Need Help, f (n) = {n/2 if n is even
3n+1 if n is odd

Need Help, f (n) = {n/2 if n is even 3n+1 if n is odd-example-1

2 Answers

2 votes

Please look at the attached

Need Help, f (n) = {n/2 if n is even 3n+1 if n is odd-example-1
Need Help, f (n) = {n/2 if n is even 3n+1 if n is odd-example-2
User Steve Wang
by
7.0k points
6 votes

Answer: N+ 1 = 3+2/2 =3

Explanation:

Starting with any positive integer N, we define the Collatz sequence corresponding to N as the numbers formed by the following operations:

If N is even, divide it by 2 to get N/2.

If N is odd, multiply it by 3 and add 1 to obtain 3N + 1.

It is conjectured but not yet proven that no matter which positive integer we start with; we always end up with 1.

For example, 10 → 5 → 16 → 8 → 4 → 2 → 1

User Aaron Deming
by
7.9k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories