## Sum of all prime numbers in an Array

Given an array arr[] of N positive integers. The task is to write a program to find the sum of all prime elements in the… 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 an array arr[] of N positive integers. The task is to write a program to find the sum of all prime elements in the… Read More »

Given a circular singly linked list containing N nodes. The task is to delete all nodes from the list which are prime. Examples: Input :… Read More »

Given an array arr[] of N positive integers. The task is to write a program to find the product of all the prime numbers of… Read More »

Given a positive number n, the task is to check whether the given number is Interprime or not. If the given number is Interprime print… Read More »

Given a range [l, r], the task is to find the sum of all the prime numbers within that range. Examples: Input : l=1 and… Read More »

Given a range of integer from ‘a’ to ‘b’ . Our task is to calculate the amount of numbers from the interval [ a, b… Read More »

Given a positive integer n, the task is to check if it is Euclid Number or not. Print ‘YES’ if the given number is Euclid… Read More »

Given a positive integer n, the task is to check if it is a Wagstaff prime or not. Print ‘YES’ if the given number is… Read More »

Given an integer ‘n’, the task is to find the sum of first ‘n’ prime numbers. First few prime numbers are: 2, 3, 5, 7,… Read More »

Given a number N, the task is to check if it is prime or not using Wilson Primality Test. Print ‘1’ isf the number is… Read More »

Given a range [L, R]. The task is to find the product of all the prime numbers in the given range from L to R… Read More »

Given a number N. The task is to find the largest good number in the divisors of given number N. A number X is defined… Read More »

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

Given a positive integer N, check if it is Quartan prime or not. Print ‘Yes’ if it is a Quartan prime otherwise Print ‘No’. Quartan… Read More »

Given a positive integer N, check if it can be expressed as a sum of two semi-primes or not. Semi-primes A number is said to… Read More »