Mathyessy
Home › Topics › Number Theory › Prime factorization

Prime factorization practice

Breaking a number into primes is the first step for divisors, GCD, LCM, perfect squares and factorial problems.

How it works

Every whole number greater than 1 can be written as a product of primes in exactly one way (apart from order). Build it with a factor tree, dividing by small primes first: 360 = 2 × 180 = 2 × 2 × 90 = … = 2³ × 3² × 5.

Once you have the factorization, many questions answer themselves. To raise a number to a power, multiply every exponent: 12⁵ = (2² × 3)⁵ = 2¹⁰ × 3⁵. To find how many times a prime p divides n!, add the multiples of p, p², p³, … up to n:

⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + …

Prime Factorization practice problems with solutions

These problems come from Mathyessy's question bank. Try each one before opening the solution.

  1. How many prime factors does 360 have counting multiplicity?

    Show answer and solution

    Answer: 6

    360 = 2³ × 3² × 5, so counting repeats there are 3 + 2 + 1 = 6 prime factors.

  2. If 12 to the power 5 equals 2 to the power a times 3 to the power b, what is a plus b?

    Show answer and solution

    Answer: 15

    12 = 2² × 3, so 12⁵ = 2¹⁰ × 3⁵. Then a + b = 10 + 5 = 15.

  3. What is the exponent of 3 in the prime factorization of 20 factorial?

    Show answer and solution

    Answer: 8

    Multiples of 3 up to 20: ⌊20/3⌋ = 6. Multiples of 9 give an extra 3 each: ⌊20/9⌋ = 2. 27 is past 20. Total 6 + 2 = 8.

  4. If n equals 2 to the power 5 times 3 squared times 7, how many even divisors does n have?

    Show answer and solution

    Answer: 30

    All divisors: (5 + 1)(2 + 1)(1 + 1) = 36. Odd divisors use no 2: (2 + 1)(1 + 1) = 6. Even divisors: 36 − 6 = 30.

Practice this in Mathyessy →Free, no account needed. Opens the Prime Factorization set with instant feedback.

Keep going

Related topics

Related practice sets in the app

All Number Theory topics · Contest math practice by topic · MATHCOUNTS practice · AMC 8 practice