Tag Archives: Prime Number

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’ if 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 among the divisors of a given number N. A number X is… 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 a… 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 Prime… 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 be… Read More
Given a positive integer N, check if it is Pythagorean prime or not. If it is a Pythagorean prime, print ‘Yes’ otherwise print ‘No’.Pythagorean primes… Read More