# Tag Archives: Prime Number

Given an array arr[] of n elements and a number K. The task is to determine if it is possible to reach the end of… Read More
Given a number N, the task is to print all prime numbers less than or equal to N.Examples:   Input: 7 Output: 2, 3, 5, 7… Read More
Generate all prime numbers between two given numbers. The task is to print prime numbers in that range. The Sieve of Eratosthenes is one of… Read More
Given Q queries and P where P is a prime number, each query has two numbers N and R and the task is to calculate… Read More
Given two numbers M and N. The task is to print the number which has the maximum number of distinct prime factors of numbers in… Read More
Given a number ‘n’, generate the first ‘n’ terms of the Smarandache-Wellin Sequence. The Smarandache-Wellin Sequence is a sequence formed by the Smarandache-Wellin numbers. Each Smarandache-Wellin… Read More
The Fibonacci numbers are the numbers in the following integer sequence. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..… Read More
Given two integers ‘L’ and ‘R’, write a program to find the total numbers that are having prime number of set bits in their binary… Read More
Prerequisite – PL/SQL introductionA prime number is a whole number greater than 1, which is only divisible by 1 and itself. First few prime numbers… Read More
Given a number N, print all prime number smaller than or equal to N in reverse order . For example, if N is 9, the output… Read More
Vantieghems Theorem is a necessary and sufficient condition for a number to be prime. It states that for a natural number n to be prime,… Read More
Given an array and limits (lower and upper limits), check the sum of the subarray in the given limit is prime or not  Examples : … Read More
Given a number N, task is to Check whether it is a permutable prime number or not. A Permutable prime number is that number which… Read More
Blum Integer is a semi-prime number, suppose p and q are the two factors (i.e. n = p * q), they(p and q) are of… Read More
Hardy Ramanujam theorem states that the number of prime factors of n will approximately be log(log(n)) for most natural numbers nExamples :   5192 has 2… Read More