# Tag Archives: prime-number

## Special prime numbersNovember 20, 2017

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 »

## Shortest path to reach one prime to other by changing single digit at a timeNovember 19, 2017

Given two four digit prime numbers, suppose 1033 and 8179, we need to find the shortest path from 1033 to 8179 by altering only single… Read More »

## Largest number with prime digitsNovember 12, 2017

Given a huge integer value n, find the largest integer value x such that x

## Prime numbers and FibonacciNovember 11, 2017

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 »

## Prime functions in Python SymPyOctober 28, 2017

How to get prime numbers quickly in python using library functions ? Library functions always makes our code easy so here we are going to… Read More »

## Count Primes in RangesOctober 27, 2017

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

## Lucas Primality TestOctober 22, 2017

A number p greater than one is prime if and only if the only divisors of p are 1 and p. First few prime numbers… Read More »

## Largest number less than N whose each digit is prime numberOctober 19, 2017

Given a very large number N (1 <= number of digit in N <= 105). The task is find the largest number X such that… Read More »

## The Ulam SpiralSeptember 27, 2017

The Ulam spiral or prime spiralis a graphical depiction of the set of prime numbers. It emphasizes the striking appearance in the spiral of prominent… Read More »

## Prime Number of Set Bits in Binary RepresentationSeptember 26, 2017

Given two integers ‘L’ and ‘R’, we need to write a program that finds the count of numbers having prime number of set bits in… Read More »

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

## Check whether a number can be expressed as a product of single digit numbersSeptember 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 »

## Composite Number

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 »

## Find coordinates of a prime number in a Prime SpiralSeptember 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 »

## Analysis of Different Methods to find Prime Number in PythonAugust 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 »