7 kyu

The Most Amicable of Numbers

420 of 1,354RichAWarren

Description:

Amicable numbers are two different numbers so related that the sum of the proper divisors of each is equal to the other number. (A proper divisor of a number is a positive factor of that number other than the number itself. For example, the proper divisors of 6 are 1, 2, and 3.)

For example, the smallest pair of amicable numbers is (220, 284); for the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110, of which the sum is 284; and the proper divisors of 284 are 1, 2, 4, 71 and 142, of which the sum is 220.

Derive a function which returns true/True if pair num1 num2 are amicable, false/False if not.

See more at https://en.wikipedia.org/wiki/Amicable_numbers

Fundamentals
Mathematics
Algorithms

Stats:

CreatedFeb 6, 2016
PublishedFeb 6, 2016
Warriors Trained2078
Total Skips49
Total Code Submissions2972
Total Times Completed1354
JavaScript Completions420
Ruby Completions97
Python Completions704
C# Completions191
Total Stars27
% of votes with a positive feedback rating91% of 190
Total "Very Satisfied" Votes157
Total "Somewhat Satisfied" Votes30
Total "Not Satisfied" Votes3
Ad
Contributors
  • RichAWarren Avatar
  • GiacomoSorbi Avatar
  • Jotha Avatar
  • kazk Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • albertogcmr Avatar
  • Just4FunCoder Avatar
Ad