Have a look at this problem: http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110101&format=html
In short, you need to calculate the maximum cycle length in a given range. Roger wrote an essay which is related to this problem. http://www.jsoftware.com/jwiki/Essays/Collatz_Conjecture Suppose we want to calculate the maximum cycle length of collatz sequences for 1, ..., 1e6. It would be defined, using Roger's definition, as >./ cn 1e6 It currently takes around 40 secs on the computer I'm using. Could you improve its efficiency? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
