##
Check whether a number is circular prime or not.
September 18, 2017

We are given a number n. Our task is to check whether the number is circular prime or not. Circular Prime : A prime number… Read More »

September 18, 2017

We are given a number n. Our task is to check whether the number is circular prime or not. Circular Prime : A prime number… Read More »

September 17, 2017

Given a non-negative number n. The problem is to check whether the given number n can be expressed as a product of single digit numbers… Read More »

A composite number is a positive integer that is not prime. In other words, it has a positive divisor other than one or itself. First… Read More »

September 5, 2017

Introduction The Ulam spiral is a graphical depiction of the set of prime numbers, devised by mathematician Stanislaw Ulam. It is constructed by writing the… Read More »

August 24, 2017

If you participate in the competitive programming, you might be familiar with the fact that questions related to Prime numbers are one of the choices… Read More »

August 20, 2017

This approach is based on Wilson’s theorem and using the fact that factorial computation can be done easily using DP Wilson theorem says if a… Read More »

August 17, 2017

Every programmer comes across the problem of checking whether a number is prime and indeed it’s one of the basic level program in any language.… Read More »

August 6, 2017

A number is said to be twisted prime if it is a prime number and reverse of the number is also a prime number. Examples:… Read More »

August 3, 2017

Given an array of n integers. Find minimum number to be inserted in array, so that sum of all elements of array becomes prime. If… Read More »

July 29, 2017

Write a C program to find sum of all prime numbers between 1 to n. Examples: Input : 10 Output : 17 Explanation : Primes… Read More »

July 10, 2017

Given a number ‘n’ and a prime number ‘p’. We need to find out the power of ‘p’ in prime factorization of n! Examples: Input… Read More »

July 6, 2017

Given a number N, print all numbers in range from 1 to N having exactly 3 divisors. Input : N = 16 Output : 4… Read More »

June 24, 2017

Given a number ‘n’, we need to find the nth number whose each digit is a prime number i.e 2, 3, 5, 7….In other words… Read More »

June 19, 2017

Given two numbers N and K. We need to find out if ‘N’ can be written as sum of ‘K’ prime numbers. Given N <=… Read More »

May 22, 2017

We have already been introduced to primality testing in the previous articles in this series. Primality Test | Set 1 (Introduction and School Method) Primality… Read More »