C code for calculation amicable numbers.