Given a number n, check it is the Almost Perfect number or not. Almost perfect number is a natural number whose sum of all divisors including 1 and the number itself is equal to 2n – 1.
Input: n = 16 Output: Yes Explanation: sum of divisors = 1 + 2 + 4 + 8 + 16 = 31 = 2n - 1 Input: n = 9 Output: No Explanation: sum of divisors = 1 + 3 + 9 ≠ 2n - 1
The almost perfect numbers are found to be of the form 2^k(k = 0, 1, 2, 3, 4, ..). However it is not proved.
- Find the Next perfect square greater than a given number
- Largest Divisor of a Number not divisible by a perfect square
- Smallest N digit number which is a perfect fourth power
- Check whether the number formed by concatenating two numbers is a perfect square or not
- Perfect Square String
- Sum of all perfect numbers present in an array
- Check if the sum of perfect squares in an array is divisible by x
- Smallest perfect square divisible by all elements of an array
- Given number of matches played, find number of teams in tournament
- Find the number of ways to divide number into four parts such that a = c and b = d
- Find count of digits in a number that divide the number
- Number of digits to be removed to make a number divisible by 3
- Count Number of animals in a zoo from given number of head and legs
- Super Ugly Number (Number whose prime factors are in given set)
- Program to check whether the given number is Buzz Number or not
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.