All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Stupid number trick IV (Posted on 2006-01-13) Difficulty: 3 of 5
Take any whole number greater than one.

1. If the number is odd, multiply it by three and add one.
2. If it is even divide it by two.
2a. If the result is still even, continue to divide by two until the result is odd.
3. Continue steps 1 and 2 until you get the same number twice.

[For example starting with 9 -> 28 -> 14 -> 7 which is considered one iteration. The next iteration brings this to 11.]

What number(s) does this process terminate at?
What starting value less than 200 takes the most iterations to terminate?

See The Solution Submitted by Jer    
Rating: 4.0000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(2): Going further (520,000,000+) | Comment 11 of 23 |
(In reply to re: Going further (520,000,000+) by Hugo)

It was a fairly easy to make computer program, but right now, I'm not on the computer that has the program. When I get on, I'll submit the source. Of course, it is C++, so you might have to make a few changes. Sorry, but I'm going to have to check my values, because, after about 700,000,000 3*x+1>2^31. In fact, after several modifications, I have found that numbers slightly larger than 113,000, will actually become negative. The 268,549,803 number is correct, but the program uses the double variable type, so it is very sssssllllllloooooooooooowwwwww.

As for the Circular fun problem, I can't understand why the solution hasn't been activated. I submitted it with the problem, and that was in July. So, I guess I'll go post it in the comments for the problem.


Edited on January 20, 2006, 11:39 pm
  Posted by Justin on 2006-01-20 09:05:18
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (8)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information