In number theory, an arithmetic number is an integer for which the average of its positive divisors is also an integer. Or in other words, a number N is arithmetic if the number of divisors divides the sum of divisors.
Given a positive integer n. The task is to check whether n is Arithmetic number or not.
Input : n = 6 Output : Yes Sum of divisor of 6 = 1 + 2 + 3 + 6 = 12. Number of divisor of 6 = 4. So, on dividing Sum of divisor by Number of divisor = 12/4 = 3, which is an integer. Input : n = 2 Output : No
- Find sum of all the factors of a number , say sum.
- Find count of divisors (say Count).
- Check if sum is divisible by count.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Find the missing number in Arithmetic Progression
- Removing a number from array without changing its arithmetic mean
- Number of ways to remove elements to maximize arithmetic mean
- Find the missing number in unordered Arithmetic Progression
- Find an integer that is common in the maximum number of given arithmetic progressions
- Arithmetic Mean
- Arithmetic Progression
- Sum of Arithmetic Geometric Sequence
- Subtract 1 without arithmetic operators
- Find N Arithmetic Means between A and B
- How to sum two integers without using arithmetic operators in C/C++?
- Program for sum of arithmetic series
- Add two numbers without using arithmetic operators
- Ratio of mth and nth term in an Arithmetic Progression (AP)
- Implement *, - and / operations using only + arithmetic operator
- Find Harmonic mean using Arithmetic mean and Geometric mean
- K-th term from given N merged Arithmetic Progressions
- Longest arithmetic progression with the given common difference
- Program for N-th term of Arithmetic Progression series
- Decimal to binary conversion without using arithmetic operators
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.