Find the smallest member of the longest amicable chain with no element exceeding one million.
Here is a more straightforward solution, without optimization.
Yet it solves the problem in a few seconds when
compiled with GHC 6.6.1 with the -O2 flag. I like to let
the compiler do the optimization, without cluttering my code.

This solution avoids using unboxed arrays, which many consider to be
somewhat of an imperitive-style hack. In fact, no memoization
at all is required.