## Smallest Special Prime which is greater than or equal to a given number

Given a number N. The task is to find the smallest special prime which is greater than or equal to N. A special prime is… Read More »

## Count primes that can be expressed as sum of two consecutive primes and 1

Given a number N. The task is to count the number of prime numbers from 2 to N that can be expressed as a sum… Read More »

## Composite numbers with digit sum 1

Given a range [L, R], the task is to find all the numbers from the range which are composite as well as the eventual sum… Read More »

## Find maximum operations to reduce N to 1

Given two numbers A and B ( A and B can be up to 106 ) which forms a number N = (A!/B!). The task… Read More »

## Print all multiplicative primes <= N

Given an integer N, the task is to print all the multiplicative primes ≤ N. Multiplicative Primes are the primes such that the product of… Read More »

## Print prime numbers with prime sum of digits in an array

Given an array arr[] and the task is to print the additive primes in an array. Additive primes: Primes such that the sum of their… Read More »

## Count pairs in an array such that at least one element is prime

Given an array arr[] of distinct elements, the task is to count the total number of distinct pairs in which at least one element is… Read More »

## Print all safe primes below N

Given an integer N, the task is to print all safe primes below N safe primes. A safe prime is a prime number of the… Read More »

## Find the sum of non-prime elements in the given array

Given an array arr[] and the task is to print the sum of the non-prime elements from the array. Examples: Input: arr[] = {1, 3,… Read More »

## Number of divisors of product of N numbers

Given an array arr[] of integers, the task is to count the number of divisors of product of all the elements from given array. Examples:… Read More »

## Sum of element whose prime factors are present in array

Given an array arr[] of non-negative integers where 2 ≤ arr[i] ≤ 106. The task is to find the sum of all those elements from… Read More »

## Largest palindromic prime in an array

Given an array arr[] of integers, the task is to print the largest palindromic prime from the array. If no element from the array is… Read More »

## Count the numbers < N which have equal number of divisors as K

Given two integers N and K, the task is to count all the numbers < N which have equal number of positive divisors as K.… Read More »

## Check if the sum of primes is divisible by any prime from the array

Given an array arr[], the task is to check whether the sum of primes in the array is divisible by any of the primes in… Read More »

## Sum of elements in an array having prime frequency

Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither… Read More »