code for SumOfAmicableNos()