1. 18
  1.  

  2. 6

    This is why I always use Fibonacci. You can go all the way up to n = 46.

    1. 1

      I wonder how high you can go with Collatz? :D

      1. 1

        113383 is the smallest number for which Collatz exceeds the bounds of an int32_t.

        159487 is the smallest number for which Collatz exceeds the bounds of a uint32_t.

        My program hasn’t finished spitting out the answer for an int64_t or uint64_t yet. :)

        1. 1

          8528817511 is the smallest number for which Collatz exceeds the bounds of an int64_t.

          12327829503 is the smallest number for which Collatz exceeds the bounds of a uint64_t.

    2. 1

      I guess it comes from too much SICP (is that possible?). An example which makes sense with scheme’s numeric tower, but less obviously becomes problematic with 64bit numbers.