## Smallest prime divisor of a number

Given a number N, find the smallest prime divisor of N. Examples: Input: 25 Output: 5 Input: 31 Output: 31 Recommended: Please try your approach… Read More »

- Efficient program to print all prime factors of a given number
- Check whether a number is semiprime or not
- Prime Factorization using Sieve O(log n) for multiple queries
- Find all divisors of a natural number | Set 1
- Find largest prime factor of a number
- Super Ugly Number (Number whose prime factors are in given set)
- k-Rough Number or k-Jagged Number
- Least prime factor of numbers till n
- Lemoine's Conjecture
- Total number of divisors for a given number
- Frugal Number
- Stormer Numbers
- Sum of all the factors of a number
- P-Smooth Numbers or P-friable Number
- Pollard's Rho Algorithm for Prime Factorization
- Product of unique prime factors of a number
- Check if the door is open or closed
- Numbers with exactly 3 divisors
- k-th prime factor of a given number
- Prime factors of a big number
- Print all prime factors and their powers
- P - smooth numbers in given ranges
- Sum of all proper divisors of a natural number
- Sphenic Number
- Ordered Prime Signature
- Lucas Primality Test
- Maximum number of unique prime factors
- Primorial of a number
- Number of distinct prime factors of first n natural numbers
- Largest factor of a given number which is a perfect square

Given a number N, find the smallest prime divisor of N. Examples: Input: 25 Output: 5 Input: 31 Output: 31 Recommended: Please try your approach… Read More »

Given a number . The task is to find the largest factor of that number which is a perfect square. Examples: Input : N =… Read More »

Given a positive integer N. The task is to check if N is an unusual number or not. Print ‘YES’ if M is an unusual… Read More »

Given a number N(1<=N<=109), the task is to find the total number of integers less than equal to n which have exactly 9 divisors. Examples:… Read More »

Given a number N which is prime. The task is to find all the numbers less than or equal to 10^6 whose minimum prime factor… Read More »

Given a number N. The task is to find the largest good number in the divisors of given number N. A number X is defined… Read More »

Given a number N. Find number of almost primes from 1 to . A number is called almost if it has exactly two distinct prime… Read More »

Given a number N (greater than 2 ). The task is to find two distinct prime numbers whose product will be equal to the given… Read More »

Given a number . The task is to find all such numbers less than N and are a product of exactly two distinct prime numbers.… Read More »

Given a number N. The task is to find the sum of all factors of the given number N. Examples: Input : N = 12… Read More »

Given an array of integers.Let us say P is the product of elements of the array. Find the number of of distinct prime factors of… Read More »

Given a range, the task is to find the count of the numbers in the given range such that the sum of its digit is… Read More »

Given Q queries which consist of two integers, one is number(1 <= number <= 106) and the other is N., the task is to find… Read More »

Given two integers L and R. The task is to find the sum of all prime factors of every number in the range[L-R]. Examples: Input:… Read More »

Given a number n, the task of the programmer is to print the factors of the number in such a way that they occur in… Read More »