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

Home > Numbers
Some definite results (Posted on 2015-09-17) Difficulty: 3 of 5
Find the possible outcomes of the following algorithm:

1.Take a random positive integer, divisible by three.
2.Consider its base 10 digits.
3.Take the sum of their cubes.
4.Go back to step 2.

Rem: You may limit your research for n<1000.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re(2): non-analytic solution Comment 5 of 5 |
(In reply to re: non-analytic solution by Charlie)

You're right, of course. 13 is the maximum number of iterations needed to reach 153 when starting with a number < 10000.

I ended up using 14 because originally, I had used the range 1..10000 instead of 1..3334 not realizing I was actually testing from 1 to 30K because of the factor of three in the method call. Not wrong, but more work than necessary. As it turns out, there are 84 numbers in the range [10000,30000] that require that 14th iteration, starting with 12558.

Before posting, I optimized the range so I only had to check 1/3 as many numbers, but I didn't recheck the upper bound needed to guarantee reaching 153 and so my note, which had been true when I was testing to 30,000, was no longer correct.



  Posted by Paul on 2015-09-18 10:00:19

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 (3)
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