geeksforgeeks
search icon
  • Courses
  • Tutorials
  • Interview Prep
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
Videos
June 07, 2022 |1.4K Views

Amicable Numbers

CPP, maths, Magic Numbers, CPP Programs
 Save  Share   Like
Description
Discussion

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. 
Examples: 
 

Input : x = 220, y = 284
Output : Yes 
Proper divisors of 220 are 1, 2, 4, 5,
10, 11, 20, 22, 44, 55 and 110. Sum of 
these is 284. Proper divisors of 284 
are 1, 2, 4, 71 and 142 with sum 220.

Input : 1 2
Output :No

Amicable Numbers: https://www.geeksforgeeks.org/check-amicable-pair/

Recommendations
Video Thumbnail
10:14
Video Thumbnail
90.7K Views | 11/01/2025...
Program to Find the Sum of All Digits of a Number
Video Thumbnail
10:37
Video Thumbnail
32.9K Views | 09/01/2025...
Graham Scan Algorithm
Video Thumbnail
03:53
Video Thumbnail
25.8K Views | 08/01/2025...
Primality Test (Introduction and School Method)
Video Thumbnail
04:41
Video Thumbnail
11.8K Views | 08/01/2025...
C++ Program to Find Roots of a Quadratic Equation
Video Thumbnail
08:23
Video Thumbnail
9.6K Views | 03/01/2025...
C++ Program on Multiplication of Two Matrices
Video Thumbnail
08:00
Video Thumbnail
4.0K Views | 03/01/2025...
JavaScript Program to Check if Two Strings are Anagrams
Video Thumbnail
03:36
Video Thumbnail
3.3K Views | 16/08/2024...
C++ Program to Return Maximum occurring Character in an Input String
Video Thumbnail
11:51
Video Thumbnail
930 Views | 18/07/2024...
Palindrome Number
Video Thumbnail
03:12
Video Thumbnail
110.2K Views | 18/07/2024...
C++ Program to Find GCD
Video Thumbnail
10:49
Video Thumbnail
43.9K Views | 17/07/2024...
C++ Program to Calculate Power of a Number
GeeksforGeeks
location
Corporate & Communications Address:
A-143, 6th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
location
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play StoreGFG App on App Store
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Campus Training Program
  • Explore
  • POTD
  • Job-A-Thon
  • Blogs
  • Nation Skill Up
  • Tutorials
  • Programming Languages
  • DSA
  • Web Technology
  • AI, ML & Data Science
  • DevOps
  • CS Core Subjects
  • Interview Preparation
  • Software and Tools
  • Courses
  • ML and Data Science
  • DSA and Placements
  • Web Development
  • Programming Languages
  • DevOps & Cloud
  • GATE
  • Trending Technologies
  • Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
  • Preparation Corner
  • Interview Corner
  • Aptitude
  • Puzzles
  • GfG 160
  • System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved