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.
- Querying maximum number of divisors that a number in a given range has
- Number with maximum number of prime factors
- Total number of divisors for a given number
- k-Rough Number or k-Jagged Number
- Queries on sum of odd number digit sums of all the factors of a number
- Number which has the maximum number of distinct prime factors in the range M to N
- Number of divisors of a given number N which are divisible by K
- Program to check whether a number is Proth number or not
- First triangular number whose number of divisors exceeds N
- Find the largest good number in the divisors of given number N
- Check whether the given number is Euclid Number or not
- Represent a number as a sum of maximum possible number of Prime Numbers
- Check if the given number is Ore number or not
- Check if a number is an Unusual Number or not
- Check if a number is a Trojan Number
- Check if a number is an Achilles number or not
- Check whether a number is Non-hypotenuse number
- Count number of trailing zeros in Binary representation of a number using Bitset
- Find the maximum number of composite summands of a number
- Find the number of integers x in range (1,N) for which x and x+1 have same number of divisors
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.