## Count of distinct sums that can be obtained by adding prime numbers from given arrays

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 »

- Program to find the Nth Prime Number
- Generate elements of the array following given conditions
- Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Check if each element of the given array is the product of exactly K prime numbers
- Find the sum of the ascii values of characters which are present at prime positions
- Check if the given string is vowel prime
- Find a sequence of N prime numbers whose sum is a composite number
- Generate N integers satisfying the given conditions
- Find out the prime numbers in the form of A+nB or B+nA
- Number of 0s and 1s at prime positions in the given array
- Find prime numbers in the first half and second half of an array
- Product of Primes of all Subsets
- Sum of numbers in a range [L, R] whose count of divisors is prime
- Minimum operations required to convert X to Y by multiplying X with the given co-primes
- Ramanujan Prime
- Sum of Semi-Prime Numbers less than or equal to N
- XOR of elements in an array having prime frequency
- Program to find the next prime number
- Triangle of numbers arising from Gilbreath's conjecture
- Queries for the difference between the count of composite and prime numbers in a given range
- Find the sum of prime numbers in the Kth array
- Find the prime P using given four integers
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Check if the first and last digit of number N is prime and their sum is less than K
- 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
- Partition first N natural number into two sets such that their sum is not coprime

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 array arr[] containing only prime numbers, the task is to check if the product of the array elements is a perfect square or… Read More »

Given an integer N ≥ 2, you can split the number as a sum of k integers i.e. N = k1 + k2 + …… Read More »

Given an integer N, the task is to print all the semi-prime numbers ≤ N. A semi-prime number is an integer which can be expressed… 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 positive integer N > 1. Find the maximum count of prime numbers whose sum is equal to given N. Examples: Input : N… Read More »

Given a range [L, R]. The task is to count the numbers in the range having difference between the sum of digits at even position… 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 an integer N, the task is to print N integers ≤ 109 such that no two consecutive of these integers are co-prime and every… 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 a number N, the task is to find the largest positive integer less than or equal to N/2 which is coprime to N. Note:… 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 a number a N and the task is to check weather the sum of absolute difference of adjacent digit is a prime or not.… 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 »