Problem 45424. Amicable pair

Amicable numbers are two different numbers such that the sum of the proper divisors of each is equal to the other number.
For example,
220 = 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110 ; sum =284
284 = 1, 2, 4, 71, 142 ; sum =220
So, 220 & 284 make an amicable pair.
Find the number of such pairs within n.
Update - Test cases added at 09-09-22

Solution Stats

41.18% Correct | 58.82% Incorrect
Last Solution submitted on Nov 01, 2022

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers6

Suggested Problems

More from this Author165

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!