## Largest number not greater than N which can become prime after rearranging its digits

Given a number N, the task is to find the largest number less than or equal to the given number N such that on rearranging… Read More »

- Program to find the Nth Prime Number
- Check if the given string is vowel prime
- Product of Primes of all Subsets
- Sum of numbers in a range [L, R] whose count of divisors is prime
- Program for Mobius Function | Set 2
- Find the sum of prime numbers in the Kth array
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Find the XOR of first N Prime Numbers
- Bitwise AND of the sum of prime numbers and the sum of composite numbers in an array
- Sum of prime numbers without odd prime digits
- Absolute difference between the XOR of Non-Prime numbers and Prime numbers of an Array
- Print characters having prime frequencies in order of occurrence
- GCD of elements which occur prime number of times
- Square free semiprimes in a given range using C++ STL
- Queries for the smallest and the largest prime number of given digit

Given a number N, the task is to find the largest number less than or equal to the given number N such that on rearranging… Read More »

Given an integer N, the task is to check if N is a Dihedral prime number or not. A Dihedral prime is a prime number… Read More »

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 »

Given two arrays arr1[] and arr2[]. The task is to count the distinct sums that can be obtained while choosing a prime element from arr1[]… Read More »

Given an integer N, the task is to find the sum of all Truncatable primes below N. Truncatable prime is a number which is left-truncatable… Read More »

Given a range [l, r], the task is to find the sum of all the even factors of the numbers from the given range. Examples:… Read More »

Given a range [l, r], the task is to find the sum of all the odd factors of the numbers from the given range. Examples:… Read More »

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 »

Given a number N. The task is to find the smallest special prime which is greater than or equal to N. A special prime is… Read More »

Given a number N. The task is to count the number of prime numbers from 2 to N that can be expressed as a sum… Read More »

Given a range [L, R], the task is to find all the numbers from the range which are composite as well as the eventual sum… Read More »

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 »

Given an integer N, the task is to print all the multiplicative primes ≤ N. Multiplicative Primes are the primes such that the product of… Read More »

Given an array arr[] and the task is to print the additive primes in an array. Additive primes: Primes such that the sum of their… Read More »

Given an array arr[] of distinct elements, the task is to count the total number of distinct pairs in which at least one element is… Read More »