# Tag Archives: Prime Number

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

## Sum of the first N Prime numbers

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 »

## Implementation of Wilson Primality test

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 »

## Product of all primes in the range from L to R

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 »

## Find the largest good number in the divisors of given number N

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 »

## Find Largest Special Prime which is less than or equal to a given number

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 »

## Check if a number is Quartan Prime or not

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 »