## k-Rough Number or k-Jagged Number

A k-rough or k-jagged number is a number whose smallest prime factor is greater than or equal to the number ‘k’. Given numbers ‘n’ and… Read More »

A k-rough or k-jagged number is a number whose smallest prime factor is greater than or equal to the number ‘k’. Given numbers ‘n’ and… Read More »

Given an integer n. we need to print all twin prime number pairs between 1 to n. A Twin prime are those numbers which are… Read More »

A cube free number square free number whose none of any divisor is a cubic number (a number which is cube of an integer). Given… Read More »

A frugal number is a number whose number of digits is strictly greater than the number of digits in its prime factorization (including exponents). If… Read More »

Given two numbers N and M. Find the number of ways in which factorial N can be expressed as a sum of two or more… Read More »

Given a number n, we need to find the product of all prime numbers between 1 to n. Examples: Input: 5 Output: 30 Explanation: product… Read More »

Given three numbers sum S, prime P and N, find all N prime numbers after prime P such that their sum is equal to S.… 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 »