Mathematical Algorithms | Prime Factorization and Divisors Divisors: Mathematically, divisor is defined as a number that divides another number completely or with a remainder. For example: Consider 6 / 3. Here 3 divides 6 completely. Also, consider 8 /3. Here 3 does not divide 8 completely. But in both cases, 3 is the divisor. Prime Factorization: Prime factorization is a very common topic of mathematics and is frequently used in several algorithms to solve problems. Prime factorization of a number is the process of finding which prime numbers multiply together to form the original number. Mathematically, any number N can be expressed as: N = p1e1 * p2e2 * p3e3 * . . . where p1, p2, p3 are prime numbers and e1, e2, e3 are the exponents of the prime numbers. Finding these primes for any number N is called prime factorization. Some practice problems on Prime Factorization and Divisors: Easy: Prime factors Fermat’s Last Theorem Sphenic Number Hoax Number Blum Integer Superperfect Number Deficient Number k-Rough Number or k-Jagged Number Perfect Number Aliquot sum Find all factors of a Natural Number Sum of all the factors of a number Total number of divisors for a given number Check if count of divisors is even or odd Intermediate: Frugal Number Betrothed numbers Lemoine’s Conjecture k-th prime factor of a given number Prime Factorization using Sieve O(log n) for multiple queries Finding power of prime number p in n! Program for Mobius Function Ordered Prime Signature Fast inverse square root Maximum number of unique prime factors Common Divisors of Two Numbers Find largest prime factor of a number Find if n can be written as product of k numbers Product of unique prime factors of a number Check whether a number has exactly three distinct factors or not Determine whether a given number is a Hyperperfect Number Hard: Smith Numbers Find numbers with n-divisors in a given range Pollard’s Rho Algorithm for Prime Factorization P-Smooth Numbers or P-friable Number Find sum of divisors of all the divisors of a natural number No of Factors of n! Print all prime factors and their powers Generation of n numbers with given set of factors Efficient program to print the number of factors of n numbers Ways to express a number as product of two different factors Sum of all divisors from 1 to n Prime factors of a big number Count Divisors of n in O(n^1/3) Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above. Last Updated : 26 Sep, 2023 Share your thoughts in the comments Add Your Comment Please Login to comment...