## Count all perfect divisors of a number

Given a number n, count total perfect divisors of n. Perfect divisors are those divisors which are square of some integer. For example a perfect… Read More »

Given a number n, count total perfect divisors of n. Perfect divisors are those divisors which are square of some integer. For example a perfect… Read More »

We can calculate the prime factorization of a number “n” in O(sqrt(n)) as discussed here. But O(sqrt n) method times out when we need to… Read More »

Given an array arr[], find nearest element for every element such that there is at least one common prime factor. In output, we need to… Read More »

Given an integer N. The task is to find a number that is smaller than or equal to N and has maximum prime factors. In… Read More »

There are Q queries. Each query is of the form of L and R. The task is to output sum of number of prime factors… Read More »

Given an array of N integers where N is even. There are two kinds of operations allowed on the array. Increase the value of any… Read More »

Given two numbers n and k, print k-th prime factor among all prime factors of n. For example, if the input number is 15 and… Read More »

The classical Sieve of Eratosthenes algorithm takes O(N log (log N)) time to find all prime numbers less than N. In this article, a modified… Read More »

Given an even number (greater than 2 ), print two prime numbers whose sum will be equal to given number. There may be several combinations… Read More »

Super-prime numbers (also known as higher order primes) are the subsequence of prime numbers that occupy prime-numbered positions within the sequence of all prime numbers.… Read More »

Mersenne Prime is a prime number that is one less than a power of two. In other words, any prime is Mersenne Prime if it… Read More »

Given a range L to R, the task is to find the highest occurring digit in prime numbers lie between L and R (both inclusive).… Read More »

Find all circular primes less than given number n. A prime number is a Circular Prime Number if all of its possible rotations are itself… Read More »

A Sphenic Number is a positive integer n which is product of exactly three distinct primes. The first few sphenic numbers are 30, 42, 66,… Read More »

A number n is called Equidigital if the number of digits in the prime factorization of n (including powers) is same as number of digits… Read More »