Given two numbers n1 & n2, We need to check whether these numbers are equivalent numbers or not.
Equivalent numbers are numbers such that the sums of their proper divisors are the same.
For example, 159, 559, and 703 are equivalent numbers. This is because all the three numbers have 57 as the sum of their proper divisors.
Input : n1 = 559, n2 = 703
Output : Yes.
Explanation: Both numbers have 57 as a sum of their proper divisors.
Input : n1 = 36, n2 = 57
Output : No.
Explanation: 36 has sum 55 while 57 has sum 23 of their proper divisors.
Find the sum of proper divisors as implemented in for Perfect number for the given numbers and then will check if both sums are equal or not.
- Numbers with exactly 3 divisors
- Check if count of divisors is even or odd
- Sum of common divisors of two numbers A and B
- Common Divisors of Two Numbers
- Check if the given array contains all the divisors of some integer
- C Program to Check if count of divisors is even or odd
- Number of divisors of product of N numbers
- Find numbers with n-divisors in a given range
- Count of numbers below N whose sum of prime divisors is K
- Find numbers with K odd divisors in a given range
- Divide the two given numbers by their common divisors
- C++ Program for Common Divisors of Two Numbers
- Java Program to Check if count of divisors is even or odd
- Sum of numbers in a range [L, R] whose count of divisors is prime
- Numbers in range [L, R] such that the count of their divisors is both even and prime
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.