7 kyu
The Most Amicable of Numbers
709 of 1,362RichAWarren
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
Similar Kata:
Stats:
Created | Feb 6, 2016 |
Published | Feb 6, 2016 |
Warriors Trained | 2107 |
Total Skips | 49 |
Total Code Submissions | 2985 |
Total Times Completed | 1362 |
JavaScript Completions | 422 |
Ruby Completions | 97 |
Python Completions | 709 |
C# Completions | 193 |
Total Stars | 27 |
% of votes with a positive feedback rating | 91% of 191 |
Total "Very Satisfied" Votes | 158 |
Total "Somewhat Satisfied" Votes | 30 |
Total "Not Satisfied" Votes | 3 |