An integer has some divisors.
For example, 10 has divisors;1, 2, 5, and 10.
Now consider a sum of divisors excluding itself; 1+2+5=8.
Perfect Number
if the sum of divisors excluding itself equals itself, then the number is called a Perfect Number.
For example, 6 has divisors;1, 2, 3, and 6. The sum of divisors excluding itself is; 1+2+3=6.
Amicable Number
The sum of divisors excluding itself usually does not equal itself. That means you get another integer. Now consider the sum of divisors of that integer. Then, it sometimes equals the original number.
For example, 220 has divisors;1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110, and 220. The sum (excluding 220) is 284. 284 has divisors;1, 2, 4, 71, 142 and 284. The sum (excluding 284) is 220.
The sum of divisors of 220 (excluding itself) becomes 284, while the sum of divisors of 284 (excluding itself) becomes 220. Such a pair is called Amicable Number.
Test Form
Enter a (positive) number, and the form tests the number is a Perfect Number or not. And if not, tests whether the number has a pair of Amicable Number or not.
* When you enter a big number, it will take a lot of time. It is recommended to enter ≤ 10000000
For Prime factorization, see here.
Updated: