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.
- Find the missing number in Arithmetic Progression
- Binary Number System | Overflow in Arithmetic Addition
- Large number arithmetic using doubly linked list
- SQL | Arithmetic Operators
- Character arithmetic in C and C++
- Computer Arithmetic | Set - 1
- Computer Arithmetic | Set - 2
- Sum of array using pointer arithmetic
- Program for sum of arithmetic series
- Longest Arithmetic Progression | DP-35
- Subtract 1 without arithmetic operators
- Add two numbers without using arithmetic operators
- How to sum two integers without using arithmetic operators in C/C++?
- Multidimensional Pointer Arithmetic in C/C++
- Arithmetic Expression Evalution
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.
Improved By : Mithun Kumar