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
- Common Divisors of Two Numbers
- Sum of common divisors of two numbers A and B
- C Program to Check if count of divisors is even or odd
- Check if the given array contains all the divisors of some integer
- Find numbers with n-divisors in a given range
- Number of divisors of product of N numbers
- Find numbers with K odd divisors in a given range
- C++ Program for Common Divisors of Two Numbers
- Divide the two given numbers by their common divisors
- Java Program to Check if count of divisors is even or odd
- Find the number of divisors of all numbers in the range [1, n]
- Find two numbers whose divisors are given in a random order
- 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.