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.)
Some Thoughts *sniff* (20 billion and no further) (starts crying) | Comment 20 of 23 |
After  a  slight  delay  since  my  last  post,  I 
have  allowed  my  program  to  retire  after  reaching  20  billion.
Up  to  this  value,  17,828,259,369  takes  456  iterations,
which  is  the  largest  for  any  number  under  20  billion.
Before  my  program  is  officially  retired  however,  I  will  post  its  final  list.  
    
                      X    Number  of  Iterations  
  -------------------------------------------  
                      2                  1  
                      3                  2  
                      6                  3  
                      7                  5  
                      9                  6  
                    18                  7  
                    27                41  
                    54                42  
                    97                43  
                  129                44  
                  171                45  
                  231                46  
                  313                47  
                  327                52  
                  654                53  
                  703                62  
                  871                65  
                1161                66  
                2322                67  
                2463                76  
                2919                79  
                3711                87  
                6171                96  
              10971                98  
              13255              101  
              17647              102  
              23529              103  
              26623              113  
              34239              114  
              35655              119  
              52527              125  
              77031              129  
            106239              130  
            142587              138  
            156159              141  
            216367              142  
            230631              164  
            410011              166  
            511935              174  
            626331              189  
            837799              195  
          1117065              196  
          1501353              197  
          1723519              207  
          2298025              208  
          3064033              209  
          3542887              217  
          3732423              222  
          5649499              228  
          6649279              248  
          8400511              256  
        11200681              257  
        14934241              258  
        15733191              263  
        31466382              264  
        36791535              278  
        63728127              357  
      127456254              358  
      226588897              359  
      268549803              362  
      537099606              363  
      670617279              370    
    1341234558              371  
    1412987847              375  
    1674652263              378  
    2610744987              394  
    4578853915              408  
    4890328815              425  
    9780657630              426  
  12212032815              433  
  12235060455              445  
  13371194527              455  
  17828259369              456  

I'll  miss  this  one!

I  had  so  much  fun  trying  to  fix  my  program,
and  watching  as  it  displayed  the  next  maximum.
Hopefully  I  can  find  another  one  like  it.
Sorry about the spacing, notepad uses spaces differently.
Edited on February 3, 2006, 8:15 pm
  Posted by Justin on 2006-02-03 19:05:00

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