Skip to content

Factors and Divisors

10 lessons · 33 questions · 30 PYQs · ~60 s per question

The idea

Every divisor of N=∏pieiN=\prod p_i^{e_i} is a choice of exponent 0…ei0\dots e_i for each prime. Counting divisors, summing them, restricting to squares, multiples or odd numbers, and even multiplying them all - each is a product of independent per-prime choices. Euler's φ\varphi counts the integers that share no prime with NN.

Textbook vs exam method

Exam method

  1. Indore 2024 Q1. 1800=2332521800=2^3 3^2 5^2; multiples of 66 ↔\leftrightarrow divisors of 300300: 3⋅2⋅3=183\cdot2\cdot3=18.Indore 2024
  2. Indore 2021 Q1. N=233353⋅7⋅13⋅17N=2^3 3^3 5^3\cdot7\cdot13\cdot17 has 512512 divisors; multiples of 4545 ↔\leftrightarrow divisors of N/45N/45: 192192; answer 320320.Indore 2021
  3. Indore 2025. 3558723^5 5^8 7^2: square factors 3×5×2=303\times5\times2=30.Indore 2025
  4. Indore 2023 Q40 / 2020 Q11. two primes with equal exponents ee; both exponents must be ≥k\ge k: (e−k+1e+1)2\left(\frac{e-k+1}{e+1}\right)^2.
  5. JIPMAT 2023 Q10. σ(220)=7⋅6⋅12=504\sigma(220)=7\cdot6\cdot12=504, proper sum 284284.JIPMAT 2023
  6. JIPMAT 2023 Q12. d(7200)=6⋅3⋅3=54d(7200)=6\cdot3\cdot3=54, proper divisors 5252.JIPMAT 2023

Worked examples

Example 1Sitter

Divisors of 360=23325360=2^3 3^2 5

Example 2Easy

Factors of 2836542^8 3^6 5^4 that are perfect cubes

Example 3Easy

Sum of even divisors of 72=233272=2^3 3^2

Example 4Typical

Product of all divisors of NN is 2183122^{18}3^{12}

Example 5Typical

Integers from 11 to 100100 co-prime to 3030

Traps

  • (e+1)(e+1) forgotten; proper vs all divisors; floor-plus-one for squares; 2ω−12^{\omega-1}; ordered vs unordered pairs.

Formulas

Number of divisors

N=∏piei ⇒ d(N)=∏(ei+1)N=\prod p_i^{e_i}\ \Rightarrow\ d(N)=\prod(e_i+1)

Exponent plus one for each prime, multiplied (JIPMAT 2023 Q12: 7200 = 2^5 3^2 5^2 has 54 divisors, 52 proper).
Sum of divisors

σ(N)=∏piei+1−1pi−1=∏(1+pi+⋯+piei)\sigma(N)=\prod\frac{p_i^{e_i+1}-1}{p_i-1}=\prod(1+p_i+\dots+p_i^{e_i})

One geometric bracket per prime; the proper-divisor sum is sigma(N) - N (JIPMAT 2023 Q10: 220 -> 284).
Perfect-square and perfect-cube divisors

#{square factors}=∏(⌊ei2⌋+1),#{cube factors}=∏(⌊ei3⌋+1)\#\{\text{square factors}\}=\prod\left(\left\lfloor\frac{e_i}{2}\right\rfloor+1\right),\quad \#\{\text{cube factors}\}=\prod\left(\left\lfloor\frac{e_i}{3}\right\rfloor+1\right)

Only even exponents (Indore 2025: 3^5 5^8 7^2 -> 3 x 5 x 2 = 30); as a probability divide by d(N) (Indore 2022 Q38: 40/288 = 5/36).
Divisors that are multiples of k

#{factors of N that are multiples of k}=d(N/k)\#\{\text{factors of }N\text{ that are multiples of }k\}=d(N/k)

Divide k out first (Indore 2024 Q1: factors of 1800 that are multiples of 6 = d(300) = 18); 'not divisible by m' = d(N) - d(N/m) (Indore 2021 Q1: 512 - 192 = 320).
Odd and even divisors

odd factors=d(odd part),even factors=d(N)−d(odd part)\text{odd factors}=d(\text{odd part}),\quad \text{even factors}=d(N)-d(\text{odd part})

Drop the power of 2 to count odd factors; even = total - odd.
Product of divisors and factor pairs

∏d∣Nd=Nd(N)/2,#{N=xy, x≤y}=⌈d(N)2⌉\prod_{d\mid N}d=N^{d(N)/2},\quad \#\{N=xy,\ x\le y\}=\left\lceil\frac{d(N)}{2}\right\rceil

Divisors pair as (x, N/x); squares have an odd divisor count and the pair (sqrt N, sqrt N).
Co-prime factor pairs

#{N=xy, gcd⁡(x,y)=1, x≤y}=2ω(N)−1\#\{N=xy,\ \gcd(x,y)=1,\ x\le y\}=2^{\omega(N)-1}

Each full prime power goes to one side; omega = number of distinct primes.
Euler's phi: count and sum of co-primes

φ(N)=N∏(1−1pi),∑gcd⁡(k,N)=1, k<Nk=Nφ(N)2\varphi(N)=N\prod\left(1-\frac1{p_i}\right),\quad \sum_{\gcd(k,N)=1,\ k<N}k=\frac{N\varphi(N)}{2}

Count of integers below N co-prime to N; co-primes pair as (k, N - k), each pair summing to N.

In the exam

Shortcuts
  • Write NN as prime powers once; every question in this block is then a product of small brackets.
  • 'Multiples of kk among the factors of NN' == factors of N/kN/k; 'divisible by aa but not bb' =d(N/a)−d(N/lcm(a,b))=d(N/a)-d(N/\text{lcm}(a,b)).
  • Probability that a random divisor is a multiple of pkqkp^{k}q^{k} in peqep^{e}q^{e}: (e−k+1e+1)2\left(\frac{e-k+1}{e+1}\right)^2 (Indore 2023 Q40: 232/2024223^2/2024^2; 2020 Q11: (5/20)2=1/16(5/20)^2=1/16).
  • Smallest number with kk divisors: factor kk into (exponent +1+1) parts, give the biggest exponents to 22, then 33, then 55, and compare.
  • Product of all divisors =Nd/2=N^{d/2}: read a:ba:b off the exponents when N=paqbN=p^{a}q^{b} is asked from its divisor product.
~60 s per question at exam speed
When to skip: Never for counts and sums of divisors. Consider skipping only a 'find NN from several divisor-count equations' item if no pattern appears in 60 s.

Before this

What the exams ask here

  • number of (proper) divisors of 7200 (JIPMAT 2023 Q12)
  • factors of 1800 that are multiples of 6 (Indore 2024 Q1); divisors not divisible by 45 (Indore 2021 Q1)
  • perfect-square factors of 3^5 5^8 7^2 (Indore 2025); probability a random factor is a perfect square / a multiple of 10^k (Indore 2020 Q11, 2022 Q38, 2023 Q40)
  • sum of (even/odd) divisors; amicable pair of 220 (JIPMAT 2023 Q10)
  • product of divisors = N^{d/2}; ways to write N as a product of two factors
  • smallest number with exactly k factors; N has 15 factors -> N^2 has ?
  • count / sum of integers below N co-prime to N (Euler phi)
Next sub-topicRemainders

Practise this free. Every mistake is saved and comes back until you fix it.

Start free