Question: Hi so this is a php program that im working on. Its about something called a Collatz Conjecture. Im able to figure out how to

Hi so this is a php program that im working on. Its about something called a Collatz Conjecture. Im able to figure out how to get the front page were the user can put in a number for it to calculate. But i fall flat on how to get the end part were it calculates the actual number. Iv research some peoples way of coding it but the only stuff i could ever find is stuff that works on cpp and when i try to put it on here it just comes with a lot of problems that i don't even understand how to fix. Help would be really great with this

What is the Collatz Conjecture: Collatz conjecture: successive operations on a number as dividing it by 2 if it is even and else multiply it by 3 and add 1. The conjecture says that the sequence ends Hi so this is a php program that im working on. Itswith 1.

about something called a Collatz Conjecture. Im able to figure out howto get the front page were the user can put in anumber for it to calculate. But i fall flat on how to

Testing Collatz The conjecture uses the following algorithm: If the number is even, divide it by 2, otherwise multiply by 3 and add 1. Repeat. Can you find a starting number that doesn't get stuck at 1? ie. n = 11 RESULTS: #1: 34 #2:17 #3: 52 #4: 26 #5: 13 # ie. n = 320 RESULTS: #1: 160 2: 80 ie n = 13 RESULTS: #1: 40 #2: 20 #3:10 #4: 5 #5: 16 ien=640 RESULTS: #1: 320 #2: 160 #3: 80 #4: 40 #5 # # 3:40 # # #6: #6: 40 # O # #7: # #8: 16 # #9: 8 #7: 20 #8: 10 #9: 5 #10: 16 #11: 8 #12: 4 #13: 2 #14: 1 #10: 2 #11:1 #10: 4 #11: 2 #12: 1

Collatz Conjecture

17 kform action="Collatz" method="POST">

Collatz Conjecture

/ 44 Collatz Conjecture Please enter a number from 5 to 20,000: Calculate

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!