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

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

## Count all the numbers less than 10^6 whose minimum prime factor is N

Given a number N which is prime. The task is to find all the numbers less than or equal to 10^6 whose minimum prime factor… 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 count of Almost Prime numbers from 1 to N

Given a number N. Find number of almost primes from 1 to . A number is called almost if it has exactly two distinct prime… Read More »

## Sum of all Primes in a given range using Sieve of Eratosthenes

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

## Lexicographically largest prime path from top-left to bottom-right in a matrix

Given a m x n matrix of positive integers. The task is to find the number of paths from the top left of the matrix… Read More »

## Find two distinct prime numbers with given product

Given a number N (greater than 2 ). The task is to find two distinct prime numbers whose product will be equal to the given… Read More »

## Longest Prime Subarray after removing one element

Given an array A of integers. We can remove at most one index from the array. Our goal is to maximize the length of the… Read More »

## Find minimum number of Log value needed to calculate Log upto N

Given an integer N. The task is to find the minimum number of log values needed to calculate all the log values from 1 to… Read More »

## Sum of Factors of a Number using Prime Factorization

Given a number N. The task is to find the sum of all factors of the given number N. Examples: Input : N = 12… Read More »

## Count number of primes in an array

Given an array arr[] of N positive integers. The task is to write a program to count the number of prime elements in the given… Read More »

## Number of prime pairs in an array

Given an array. The task is to count the possible pairs which can be formed using the elements of the array where both of the… Read More »

## Find the largest twins in given range

Given a range [low..high], print the largest twin numbers in given range (low and high inclusive). Two numbers are twins if they are primes and… Read More »

## Alternate Primes till N

We have to print alternate prime numbers till N. Examples: Input : N = 10 Output : 2 5 Input : N = 15 Output… Read More »