## Print the nearest prime number formed by adding prime numbers to N

Given a number N. The task is to print the nearest prime if the number is not prime by making it prime by adding prime… Read More »

- Permutation of first N positive integers such that prime numbers are at prime indices
- Minimum window size containing atleast P primes in every window of given range
- Find the minimum number to be added to N to make it a prime number
- Sum of prime numbers in range [L, R] from given Array for Q queries
- Find the position of the given Prime Number
- Longest sub-array of Prime Numbers using Segmented Sieve
- Even Perfect Number
- Count of subarrays having exactly K prime numbers
- Find the word with most anagrams in a given sentence
- Program to find the LCM of two prime numbers
- Find the largest composite number that divides N but is strictly lesser than N
- Trial division Algorithm for Prime Factorization
- Group all co-prime numbers from 1 to N
- Prime Fibonnaci | TCS Mockvita 2020
- Count of the non-prime divisors of a given number
- Nodes with prime degree in an undirected Graph
- Count of cells in a matrix whose adjacent cells's sum is prime Number
- Check if all nodes of the Binary Tree can be represented as sum of two primes
- Check if a number is Prime, Semi-Prime or Composite for very large numbers
- Permutation of first N positive integers such that prime numbers are at prime indices | Set 2
- Count of all prime weight nodes between given nodes in the given Tree
- Construct a string that has exactly K subsequences from given string
- Count of distinct Primonacci Numbers in a given range [L, R]
- Sum of factorials of Prime numbers in a Linked list
- Count of numbers upto M divisible by given Prime Numbers
- Count Sexy Prime Pairs in the given array
- Count of Prime digits in a Number
- Check if the number is a Prime power number
- Print all Co-Prime Levels of a Binary Tree
- Minimum changes required to make all Array elements Prime

Given a number N. The task is to print the nearest prime if the number is not prime by making it prime by adding prime… Read More »

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,… 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… 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 introduction A prime number is a whole number greater than 1, which is only divisible by 1 and itself. First few prime… 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… 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 the number which only haves 2 factors suppose p and q (i.e. n = p * q), both are Semi-prime and also… Read More »