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
Similar Kata:
Stats:
Created | Feb 6, 2016 |
Published | Feb 6, 2016 |
Warriors Trained | 2078 |
Total Skips | 49 |
Total Code Submissions | 2972 |
Total Times Completed | 1354 |
JavaScript Completions | 420 |
Ruby Completions | 97 |
Python Completions | 704 |
C# Completions | 191 |
Total Stars | 27 |
% of votes with a positive feedback rating | 91% of 190 |
Total "Very Satisfied" Votes | 157 |
Total "Somewhat Satisfied" Votes | 30 |
Total "Not Satisfied" Votes | 3 |