Factors and Divisors: Formulas, Examples, and Exam Practice
Master factor and divisor formulas for placement aptitude tests. Covers prime factorisation, counting divisors, even/odd splits, sum, and product.
Every placement aptitude test has at least two or three questions built around prime factorisation, and most students lose those marks because they never learned the four key divisor formulas.
This guide covers those formulas, walks through verified worked examples, and explains how each question type shows up in campus placement tests.
What Factors and Divisors Are
A divisor (or factor) of a number N is any positive integer that divides N exactly, leaving no remainder. There is no practical difference between the two terms. Indian placement papers, textbooks, and competitive exam question banks use them interchangeably.
For N = 24, the divisors are 1, 2, 3, 4, 6, 8, 12, and 24. Every one of those integers divides 24 without a leftover.
The set of divisors follows directly from the prime factorisation of N. That is the starting point for every formula in this guide.
Counting Divisors Using Prime Factorisation
If N can be written as:
- N =
x^a·y^b·z^c· (and so on for each prime factor)
then the total number of divisors of N is:
- Number of divisors = (a + 1)(b + 1)(c + 1) · …
The logic: each prime factor x can appear in a divisor with an exponent of 0, 1, 2, …, or a. That gives (a + 1) choices for that prime alone. Multiply the choices across all primes and you get the total count.
Worked example: divisors of 7200
- Step 1: prime factorise. 7200 =
2^5·3^2·5^2 - Step 2: apply formula. (5 + 1)(2 + 1)(2 + 1) = 6 · 3 · 3 = 54
- Result: 7200 has 54 divisors.
This is a standard question in TCS NQT and Infosys InfyTQ number theory sections. The approach is identical regardless of the number’s size.
Even and Odd Divisors — Splitting the Count
Aptitude questions often ask for even divisors or odd divisors separately. Each has its own sub-formula.
For a number N = 2^a · x^b · y^c · …:
- Odd divisors: exclude all powers of 2. Odd divisor count = (b + 1)(c + 1) · …
- Even divisors: at least one factor of 2 must be included. Even divisor count = a · (b + 1)(c + 1) · …
Alternatively, even divisors = total divisors minus odd divisors.
Worked example: even and odd divisors of 84
- Step 1: prime factorise. 84 =
2^2·3^1·7^1 - Step 2: total divisors. (2 + 1)(1 + 1)(1 + 1) = 3 · 2 · 2 = 12
- Step 3: odd divisors (drop the
2^2term). (1 + 1)(1 + 1) = 2 · 2 = 4 (these are 1, 3, 7, 21) - Step 4: even divisors. 12 - 4 = 8
The even-divisors shortcut also gives 8: a · (b + 1)(c + 1) = 2 · (1 + 1)(1 + 1) = 2 · 2 · 2 = 8. Both routes agree.
For arithmetic tricks that speed up related calculations, see the guide on number shortcuts for aptitude tests.
Sum and Product of All Divisors
Sum of divisors
The divisor function from number theory gives a clean formula. For N = x^a · y^b · z^c · …:
- Sum of divisors =
(x^(a+1) - 1) / (x - 1)·(y^(b+1) - 1) / (y - 1)·(z^(c+1) - 1) / (z - 1)· …
Each factor in that product is a geometric series: 1 + x + x^2 + ... + x^a = (x^(a+1) - 1) / (x - 1).
Worked example: sum of divisors of 120
- Step 1: prime factorise. 120 =
2^3·3^1·5^1 - Step 2: compute each geometric series.
- For prime 2:
(2^4 - 1) / (2 - 1)= 15 / 1 = 15 - For prime 3:
(3^2 - 1) / (3 - 1)= 8 / 2 = 4 - For prime 5:
(5^2 - 1) / (5 - 1)= 24 / 4 = 6
- For prime 2:
- Step 3: multiply. 15 · 4 · 6 = 360
- Result: the sum of all divisors of 120 is 360.
Product of divisors
The product shortcut is simpler. If N has d divisors in total:
- Product of divisors = N raised to the power d/2
It works because the divisors pair up symmetrically: each divisor q pairs with N/q, and q · (N/q) = N. So each pair contributes exactly N to the product.
Worked example: product of divisors of 120
- Number of divisors of 120: (3 + 1)(1 + 1)(1 + 1) = 4 · 2 · 2 = 16
- Product of divisors =
120^(16/2)=120^8
Placement tests rarely ask you to compute this numerically. They test whether you know the formula, typically as an MCQ with the correct form among the options.
Perfect Squares and the Odd-Divisor-Count Rule
Perfect squares always produce an odd number of divisors. Non-perfect-squares always produce an even number.
The reason: every divisor d of N pairs with N/d. For a non-perfect-square these are always distinct pairs, giving an even total. For a perfect square, the square root of N pairs with itself, adding one unpaired divisor and making the total odd.
Placement question pattern: “Which of the following has an odd number of divisors?” Eliminate non-perfect-squares immediately.
For N = 36 = 2^2 · 3^2: divisor count = (2 + 1)(2 + 1) = 9. Odd count confirms 36 is a perfect square. The divisors are 1, 2, 3, 4, 6, 9, 12, 18, 36. Note that 6 (the square root) has no distinct partner.
Euler’s Totient Function
The Euler’s totient function, written as ϕ(N), counts how many integers from 1 to N share no common factor with N (are coprime to N).
For N = x^a · y^b · z^c · …, the formula is:
- ϕ(N) = N · (1 - 1/x) · (1 - 1/y) · (1 - 1/z) · …
This appears in GATE-style number theory sections and in some advanced aptitude rounds for product and consulting firms. For standard campus placement drives, the divisor-count and sum formulas above are far more common.
Worked example: ϕ(36)
- 36 =
2^2·3^2 - ϕ(36) = 36 · (1 - 1/2) · (1 - 1/3) = 36 · (1/2) · (2/3) = 12
- Result: 12 integers from 1 to 36 are coprime to 36.
How These Problems Appear in Placement Tests
Divisor questions in campus placement aptitude tests tend to fall into four categories:
| Question type | What to do |
|---|---|
| ”How many divisors does X have?” | Prime factorise X; apply (a+1)(b+1)… |
| ”How many even/odd divisors?” | Separate the 2^a term; use the split formula |
| ”Find the sum of divisors of X” | Apply the geometric-series product formula |
| ”Is X a perfect square?” | Check if divisor count is odd |
The same prime-factorisation step opens all four question types. Practise it until it’s automatic (factor trees or repeated division both work).
For more number-based aptitude practice, the guides on calendar problems in placement aptitude and clock problems in competitive exams cover similar structured problem-solving patterns.
Breaking a number into its prime components is exactly the kind of structured decomposition that shows up beyond aptitude tests. Prompt engineering with LLMs uses the same instinct: decompose a complex request into atomic components before building the solution. If you want to try that in practice, TinkerLLM is ₹299 to access. Start with the prompt-decomposition module and the parallel to prime factorisation becomes clear quickly.
Primary sources
Frequently asked questions
What is the difference between a factor and a divisor?
Nothing practical. A factor of N and a divisor of N describe the same thing: an integer that divides N exactly, leaving no remainder. Indian textbooks and placement papers use both terms interchangeably.
How do I find the number of divisors of a large number quickly?
Write the prime factorisation first. If N = x^a times y^b times z^c, the divisor count is (a+1)(b+1)(c+1). For 7200 = 2^5 times 3^2 times 5^2, the count is (5+1)(2+1)(2+1) = 54.
What is the formula for counting even divisors of a number?
If N = 2^a times x^b times y^c, even divisors = a times (b+1)(c+1). Odd divisors = (b+1)(c+1), which is the divisor count of N after removing all powers of 2.
Why do perfect squares have an odd number of divisors?
Every divisor d of N pairs with N divided by d. When N is a perfect square, the square root pairs with itself rather than with a distinct partner. That self-paired divisor makes the total count odd.
What is Euler's totient function and when does it appear in exams?
Euler's totient ϕ(N) counts integers from 1 to N that share no common factor with N. It appears in advanced aptitude and GATE-style number theory questions. For N = 2^a times x^b, ϕ(N) = N times (1 - 1/2) times (1 - 1/x).
How many divisors does 360 have?
360 = 2^3 times 3^2 times 5^1. Divisor count = (3+1)(2+1)(1+1) = 4 times 3 times 2 = 24.
Can two different numbers have the same number of divisors?
Yes. Both 14 (= 2 times 7) and 15 (= 3 times 5) have exactly 4 divisors. The divisor count depends on the exponent pattern in the prime factorisation, not on the actual prime values used.
A self-paced playground for building with LLMs.
TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.
Try TinkerLLM (₹299 launch)