## 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 »

- Program to find the Nth Prime Number
- Generate elements of the array following given conditions
- Check if each element of the given array is the product of exactly K prime numbers
- Maximize the size of array by deleting exactly k sub-arrays to make array prime
- Check if the given string is vowel prime
- Largest number not greater than N which can become prime after rearranging its digits
- Count the number of primes in the prefix sum array of the given array
- Product of Primes of all Subsets
- Find prime number K in an array such that (A[i] % K) is maximum
- Sum of Semi-Prime Numbers less than or equal to N
- Sum of multiplication of triplet of divisors of a number
- Count of distinct sums that can be obtained by adding prime numbers from given arrays
- Queries for the difference between the count of composite and prime numbers in a given range
- Check whether N is a Dihedral Prime Number or not
- Sum of prime numbers without odd prime digits
- Rearrange the given string such that all prime multiple indexes have same character
- Square free semiprimes in a given range using C++ STL
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Program for Mobius Function | Set 2
- Queries for the smallest and the largest prime number of given digit

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 »

Given Q queries where every query consists of an integer D, the task is to find the smallest and the largest prime number with D… Read More »

Given a range L and R count all numbers between L to R such that sum of digit of each number and sum of square… Read More »

Given two integers L and R (L < = R). The task is to find all square free semiprimes in the range L to R… Read More »

Given an integer N. The task is to find the Nth prime number. Examples: Input : 5 Output : 11 Input : 16 Output :… Read More »

Given an array a[] of size N. The value of a subset is the product of primes in that subset. A non-prime is considered to… Read More »

Given an integer N. The task is to find the sum of the first N prime numbers which don’t contain any odd primes as their… Read More »

Given a string str of lowercase English alphabets, the task is to check whether the string is a vowel prime or not. A string is… Read More »

Given an integer N, the task is to find the sum of semi-prime numbers which are less than or equal to N. A Semi prime… Read More »

Given a string str of size N. The task is to find out whether it is possible to rearrange characters in string str so that… Read More »

Given an integer N, for every integer i in the range 2 to N, assign a positive integer such that the following conditions hold :… Read More »

Given Q queries where each query consists of two positive integers L and R and the task is to find the absolute difference between the… Read More »

Given an array of numbers and the value of , check if each number can be expressed as the product of exactly prime numbers. For… Read More »

Given an array arr[] of N positive integers and a non negative integer K. The task is to delete exactly K sub-arrays from the array… Read More »

Given an array arr[] of N integers, the task is to count the number of primes in the prefix sum array of the given array.… Read More »