Turkish Project Euler Question 21 Amicable Numbers
Turkish Project Euler Question 21 Amicable Numbers
Let d(n) be defined as the sum of the proper divisors of n.If a ≠ b, and d(b) = a and d(a) = b, then a and b are called amicable numbers.
For example, the divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore, d(220) = 284.
The divisors of 284 are 1, 2, 4, 71, and 142; therefore, d(284) = 220.
Calculate the sum of all amicable numbers under 10000.


Yorum Gönder