## Kth prime number greater than N

Given a number N, the task is to print the Kth prime number greater than N. Note: N and K are so given such that… Read More »

## Difference between the largest and the smallest primes in an array

Given an array of integers where all the elements are less than 10^6. The task is to find the difference between the largest and the… Read More »

## Represent a number as a sum of maximum possible number of Prime Numbers

Given a positive integer . The task is to represent it as a sum of the maximum possible number of prime numbers. (N > 1)… Read More »

## Numbers in range [L, R] such that the count of their divisors is both even and prime

Given a range [L, R], the task is to find the numbers from the range which have the count of their divisors as even as… Read More »

## Check whether the given numbers are Cousin prime or not

Given two positive integer n1 and n2, the task is to check if both are Cousin primes or not. Print ‘YES’ if the both the… Read More »

## Sum of every K’th prime number in an array

Given an array of integers (less than 10^6), the task is to find the sum of all the prime numbers which appear after every (k-1)… Read More »

## Chen Prime Number

Given a positive integer n, the task is to check if it is a Chen prime number. If the given number is a Chen Prime… Read More »

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

## Delete all Prime Nodes from a Circular Singly Linked List

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 »

## Product 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 product of all the prime numbers of… Read More »

## Interprime

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 »

## Sum of all the prime numbers in a given range

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 »

## Count all the numbers in a range with smallest factor as K

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 »

## Check whether the given number is Euclid Number or not

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 »

## Check whether the given number is Wagstaff prime or not

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 »