From WebUI, 44 Minutes ago, written in Haskell.
This paste will slip away in 23 Hours.
Embed
  1. nextCollatz n
  2.   | even n = div n 2
  3.   | otherwise = n * 3 + 1
  4.  
  5. collatzCount c n
  6.   | n == 1 = c
  7.   | otherwise = collatzCount (c + 1) (nextCollatz n)
  8.  
  9. lengths = map (collatzCount 0) [1..30]
  10.  
  11. main = putStrLn $ show lengths