## Sophie Germain Prime

Write a program to print all sophie germain number less than n. A prime number p is called a sophie prime number if 2p+1 is… Read More »

Write a program to print all sophie germain number less than n. A prime number p is called a sophie prime number if 2p+1 is… Read More »

Prime Triplet is a set of three prime numbers of the form (p, p+2, p+6) or (p, p+4, p+6). This is the closest possible grouping… Read More »

Given an array A[], find a subset of maximum size in which sum of every pair of elements is a prime number. Print its length… Read More »

Given a non-negative integer n. The problem is to find the sum of the largest prime factor of each number less than equal to n.… Read More »

In number theory, a Balanced Prime is a prime number with equal-sized prime gaps above and below it, so that it is equal to the… Read More »

Given n, find the smallest integer which has n factors or more. It may be assumed that the result is less than 1000001. Examples: Input… Read More »

In mathematics, Sexy Primes are prime numbers that differ from each other by six. For example, the numbers 5 and 11 are both sexy primes,… Read More »

Given three integers A, B and K. We need to find no. of K-prime numbers in the range [A, B]. A number is called K-prime… Read More »

Given n queries of the form range [L, R]. The task is to find the maximum difference between two prime numbers in the range for… Read More »

A prime number is a whole number greater than 1, which is only divisible by 1 and itself. First few prime numbers are : 2… Read More »

Given a number n, print all primes smaller than n. Examples: Input : 30 Output : 2 3 5 7 11 13 17 19 23… Read More »

Given two numbers n and k, find whether there exist at least k Special prime numbers or not from 2 to n inclusively. A prime… Read More »

Given a number, find the numbers (smaller than or equal to n) which are both Fibonacci and prime. Examples: Input : n = 40 Output:… Read More »

Given an array arr[] of n positive integers. Represent every number as its factors (x * y = arr[i]) [Here x or y cannot be… Read More »

Given a range [L, R], we need to find the count of total numbers of prime numbers in the the range [L, R] where 0