NEOCODE
Back To Top

Factors and Factorials Explained

Factors of a Number

To find the factors of a number N, we use its prime factorization. Here’s how it works:

Prime Factorization: If N = pa × qb × rc, where p, q, r are prime factors and a, b, c are their powers, then:

  1. Number of factors: (a+1)(b+1)(c+1)
  2. Number of odd factors: Multiply the powers of only odd prime factors increased by 1.
  3. Number of even factors: Total factors - Odd factors.
  4. Number of prime factors: a + b + c
  5. Product of factors: N(Number of factors / 2)
  6. Sum of factors: (p0 + p1 + ... + pa) × (q0 + q1 + ... + qb) × (r0 + r1 + ... + rc)

Example: Let’s take N = 120. Its prime factorization is 23 × 31 × 51.

  1. Sum of factors: [(20 + 21 + 22 + 23) × (30 + 31) × (50 + 51)] = 1560
  2. Number of factors: (3+1)(1+1)(1+1) = 16
  3. Product of factors: 120(16/2) = 1208
  4. Odd factors: (1+1)(1+1) = 4
  5. Even factors: 16 - 4 = 12
  6. Prime factors: 3 + 1 + 1 = 5

Practice Questions: Factors

  1. Find the number of factors of 360.
  2. What is the sum of the factors of 100?
  3. How many odd factors does 84 have?
  4. Find the product of the factors of 24.
  5. How many prime factors does 210 have?

Factorials

The factorial of a number N (written as N!) is the product of all positive integers from 1 to N.

Formula: N! = N × (N-1) × (N-2) × ... × 1

Note: 0! = 1 and 1! = 1.

Example: 4! = 4 × 3 × 2 × 1 = 24

Practice Questions: Factorials

  1. Calculate 6!.
  2. What is the value of 0! + 1! + 2! + 3!?
  3. Find the value of 7! / 5!.
  4. Calculate 10! - 9!.
  5. What is the value of 5! × 2!?

Trailing Zeros in Factorials

To find the number of trailing zeros in N!, divide N by powers of 5 until the result is less than 1. Add only the whole number parts.

Formula: Number of trailing zeros = N/5 + N/52 + N/53 + ...

Example: Find trailing zeros in 102!.

102/5 + 102/25 = 20 + 4 = 24 trailing zeros.

Practice Questions: Trailing Zeros

  1. How many trailing zeros are in 50!?
  2. Find the number of trailing zeros in 100!.
  3. What is the number of trailing zeros in 75!?
  4. Calculate the trailing zeros in 200!.
  5. How many trailing zeros are in 125!?

Highest Power of a Number in a Factorial

To find the highest power of a prime number p in N!, use:

Formula: Highest power of p = N/p + N/p2 + N/p3 + ...

Example 1: Highest power of 2 in 50!.

50/2 + 50/4 + 50/8 + 50/16 + 50/32 = 25 + 12 + 6 + 3 + 1 = 47

Example 2: Highest power of 6 in 20!.

6 = 2 × 3. Find the highest power of 2 and 3 in 20!.

Highest power of 2 = 20/2 + 20/4 + 20/8 + 20/16 = 10 + 5 + 2 + 1 = 18

Highest power of 3 = 20/3 + 20/9 = 6 + 2 = 8

Highest power of 6 = minimum of (18, 8) = 8

Practice Questions: Highest Power

  1. Find the highest power of 3 in 30!.
  2. What is the highest power of 5 in 100!?
  3. Calculate the highest power of 7 in 50!.
  4. Find the highest power of 2 in 40!.
  5. What is the highest power of 10 in 25!?

Tips and Tricks