Skip to content

Tag Archives: Prime Number

Given a String str , the task is to check if the sum of ASCII value of all characters is a Prime Number or not.… Read More
Given a number ‘n’, check whether it is an emirpimes or not.  An emirpimes(“semiprime” when spelled backwards) derives its definition from the way it is… Read More
Given an array of N integers, the task is to perform the following two queries: query(start, end) : Print the number of prime numbers in… Read More
Given an array of non-negative integers and range query l, r, find number of prefix sum which are prime numbers in that given range. Prerequisite… Read More
Given a number n, find the ordered prime signatures and using this find the number of divisor of given n. Any positive integer, ‘n’ can be… 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
In mathematics, Rosser’s Theorem states that the nth prime number is greater than the product of n and natural logarithm of n for all n… Read More
Given L and R, find a possible non-transitive triplet (a, b, c) such that pair (a, b) is co-prime and pair (b, c) is co-prime… Read More
It says that there is always one prime number between any two consecutive natural number’s(n = 1, 2, 3, 4, 5, …) square. This is… Read More
Given a number n, we need to find the product of all of its unique prime factors. Prime factors: It is basically a factor of… 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 of… Read More