## Generating all divisors of a number using its prime factorization

Given an integer N, the task is to find all of its divisors using its prime factorization. Examples: Input: N = 6 Output: 1 2… Read More »

## Program for Mobius Function | Set 2

Given an integer N. The task is to find Mobius function of all numbers from 1 to N. Examples: Input: N = 5 Output: 1… Read More »

## Count occurrences of a prime number in the prime factorization of every element from the given range

Given three integers L, R and P where P is prime, the task is to count the number of times P occurs in the prime… Read More »

## Number of N length sequences whose product is M

Given two integers N and M, the task is to find the count of possible sequences a1, a2, … of length N such that the… Read More »

## Print all numbers whose set of prime factors is a subset of the set of the prime factors of X

Given a number X and an array of N numbers. The task is to print all the numbers in the array whose set of prime… Read More »

## Count arrays of length K whose product of elements is same as that of given array

Given an integer array arr[] of length N and an integer K, the task is to count the number of possible arrays of length K… Read More »

## Sum of multiplication of triplet of divisors of a number

Given an array arr[] of integers of size n. For each element, you have to print the summation of multiplication of every triplet formed using… Read More »

## Check for an array element that is co-prime with all others

Given an array arr[] of positive integers where 2 ≤ arr[i] ≤ 106 for all possible values of i. The task is to check whether… Read More »

## Find maximum operations to reduce N to 1

Given two numbers A and B ( A and B can be up to 106 ) which forms a number N = (A!/B!). The task… Read More »

## Count operations of the given type required to reduce N to 0

Given an integer n. The task is to count the number of operations required to reduce n to 0. In every operation, n can be… Read More »

## Check whether a number is Non-hypotenuse number

Given a positive integer n, the task is to check if n is a Non-hypotenuse number or not. If n is a Non-hypotenuse number then… Read More »

## Minimum prime number operations to convert A to B

Given two integers A and B, the task is to convert A to B with minimum number of following operations: Multiply A by any prime… Read More »

## Count common prime factors of two numbers

Given two integer and , the task is to find the count of common factors of two numbers where factors are prime. Examples: Input: A… Read More »

## Sum of element whose prime factors are present in array

Given an array arr[] of non-negative integers where 2 ≤ arr[i] ≤ 106. The task is to find the sum of all those elements from… Read More »

## Prime Factor

Prime factor is the factor of the given number which is a prime number. Factors are the numbers you multiply together to get another number.… Read More »