E ExamMaster

GMAT Focus Edition · Advanced Quantitative Aptitude

Number System and Number Theory

Factors, divisibility, remainders, HCF-LCM, base systems and properties of integers.

Six concepts that carry CAT number theory: divisibility, divisors, unit digits, the HCF–LCM product, modular remainders via Fermat and Euler, and trailing zeroes. Every CAT question here is one identity applied once — the paper pays for knowing which identity, not for long division.

  • GMAT Focus Edition
  • Hard level
  • 6 concepts
  • 21 practice questions

1Divisibility, and how to test a composite

The rules for 2, 4, 5, 8 and 10 read the tail of the number; the rules for 3 and 9 read its digit sum; the rule for 11 reads the alternating digit sum. For 918082 the odd places give 9 + 8 + 8 = 25 and the even places 1 + 0 + 2 = 3, and 25 − 3 = 22 is a multiple of 11 — so the number is, and indeed 918082 = 11 × 83462.

For a composite divisor there is no single rule, and the correct move is to split it into factors that are coprime. 72 = 8 × 9 works because 8 and 9 share no factor. 12 = 2 × 6 does not: 18 passes both those tests and is not a multiple of 12.

Figure. Each prime has a digit test; a composite divisor requires every prime factor's test to pass. Checking 6 means checking 2 and 3, not inventing a separate rule.

The rules worth having by heart
DivisorTestExample
2, 5, 10Last digit47952 ends in 2, so it is even
4Last two digits form a multiple of 452 = 4 × 13, so 47952 passes
8Last three digits form a multiple of 8952 = 8 × 119, so 47952 passes
3, 9Digit sum4+7+9+5+2 = 27, a multiple of 9
11Odd-place sum minus even-place sum918082: 25 − 3 = 22
CompositeSplit into coprime factors and test each72 = 8 × 9, 45 = 5 × 9, 12 = 3 × 4

Is 47952 a multiple of 72?

Decide without dividing by 72.

  • 72 = 8 × 9, and gcd(8, 9) = 1test both
  • Last three digits: 952 ÷ 8119, exact
  • Digit sum: 4 + 7 + 9 + 5 + 2 = 27, and 27 ÷ 93, exact
  • Both hold, so 72 divides it: 47952 ÷ 72666

Pro tip. The coprime condition is not a technicality. Split 72 as 6 × 12 and both tests can pass on a number that 72 does not divide, because 6 and 12 both re-use the factor 6 and between them guarantee only a multiple of lcm(6, 12) = 12. Whenever you split a divisor, multiply your two factors back and check the product is the divisor itself, not something smaller.

A number is divisible by both 4 and 6. It must also be divisible by
  1. 24, since 4 × 6 = 24
  2. 12
  3. Neither 12 nor 24 is guaranteed

What two tests together guarantee is the LCM, not the product — and lcm(4, 6) = 12 because 4 and 6 share a factor of 2. Take 12 itself: divisible by 4, divisible by 6, not divisible by 24. Multiplying the two divisors is only safe when they are coprime, which is exactly why 72 is split as 8 × 9.

2Counting divisors, and summing them

Write N = p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}. Any divisor is built by choosing an exponent for each prime independently — anything from 0 to a_i for p_i — so the number of divisors is (a_1+1)(a_2+1)\cdots(a_k+1). The same independence gives the sum of all divisors as a product of geometric series, one per prime: \sigma(N)=\prod_i\frac{p_i^{a_i+1}-1}{p_i-1}.

Factors pair off around \sqrt{N}, so the count is odd exactly when N is a perfect square and its square root is left unpaired. An odd divisor count is therefore an instant square flag.

Figure. After prime factorisation n=\prod p_i^{e_i}, the divisor count is \prod(e_i+1) and the divisor sum multiplies each geometric series (p^{e+1}-1)/(p-1). The tree is bookkeeping for those products, not a substitute for the formulas.

How it works

  1. Factorise completelyStrip out 2s first, then 3s, then 5s; stop when the quotient is prime.
  2. Add one to each exponentThe extra choice is the exponent 0, which means leaving that prime out of the factor.
  3. Multiply, then sumThe counts multiply for d(N). For \sigma(N), replace each count (a+1) by the geometric sum (p^{a+1}-1)/(p-1).

Divisor count and divisor sum

Find the number of factors of 7200 and the sum of all its factors.

  • 7200 = 72 × 100 = (2³·3²)(2²·5²)2⁵·3²·5²
  • d(7200) = (5+1)(2+1)(2+1) = 6 × 3 × 354
  • σ(7200) = (2⁶−1)/(2−1) · (3³−1)/(3−1) · (5³−1)/(5−1)63 × 13 × 31
  • 63 × 13 = 819; 819 × 3125389

Pro tip. Always write the number in prime-power form first; both the divisor count and divisor sum then drop out mechanically. Expanding (1+2+4+8+16+32)(1+3+9)(1+5+25) mentally shows every one of the 54 terms is a distinct factor — which is why the product is their sum.

A positive integer has an odd number of factors. It must be
  1. A prime
  2. A perfect square
  3. An odd number

Factors come in pairs d and N/d, so the count is even unless one factor pairs with itself — which happens only when d = √N, i.e. when N is a perfect square. A prime has exactly two factors, an even count. And 36 is even with nine factors, so oddness of the number has nothing to do with it.

3Unit digits, and the cycle of four

The unit digit of a power depends on nothing but the unit digit of the base, and it repeats with a period of at most 4. Powers of 7 run 7, 9, 3, 1 and then start again; powers of 2 run 2, 4, 8, 6; powers of 4 and 9 have period 2; and 0, 1, 5 and 6 never change at all.

So reduce the exponent modulo the cycle length and read the cycle. The one thing to watch is a remainder of 0: an exponent that is an exact multiple of the cycle length lands on the last entry of the cycle, not the first.

Figure. Multiplying by 7 once more walks you one step round this loop, and after four steps you are back where you started. The exponent's remainder on division by 4 names the node — with the fourth node carrying remainder 0, which is the only place a candidate ever comes off this diagram wrong.

How it works

  1. Throw the base awayKeep only its unit digit; 17, 27 and 1237 all behave exactly like 7.
  2. Reduce the exponent mod the cycleFor cycle length 4, divide the exponent by 4 and keep the remainder, treating a remainder of 0 as 4.
  3. Read the cycleCount that many places along the base's cycle, starting from the first power.

A product of two large powers

Find the unit digit of 7^{95} \times 3^{58}.

  • 95 ÷ 4 leaves 3; the cycle of 7 is 7, 9, 3, 17⁹⁵ ends in 3
  • 58 ÷ 4 leaves 2; the cycle of 3 is 3, 9, 7, 13⁵⁸ ends in 9
  • Multiply the two unit digits: 3 × 927
  • Keep the unit digit of that7

Pro tip. You may multiply unit digits and take the unit digit of the product, because a carry only ever moves leftwards — nothing above the units column can reach back down into it. The same licence lets you add, so a question about the unit digit of 7⁹⁵ + 3⁵⁸ is answered from the very same two rows: 3 + 9 = 12, unit digit 2.

The unit digit of 2^{100} is
  1. 2
  2. 4
  3. 6

The cycle of 2 is 2, 4, 8, 6 and 100 is an exact multiple of 4, so you land on the fourth entry, 6. Treating the remainder 0 as "start of the cycle" gives 2 and is the standard slip; 4 comes from reading the remainder as 2 instead of 0.

4HCF × LCM, and why only two numbers

For any two positive integers a and b, \mathrm{HCF}(a,b)\times\mathrm{LCM}(a,b)=a\times b. The identity is an immediate consequence of writing both numbers in primes: at each prime the HCF takes the smaller exponent and the LCM the larger, so the two exponents add to the sum of the original exponents and the primes multiply back to ab.

The same argument fails for three or more numbers. \mathrm{HCF}(a,b,c)\times\mathrm{LCM}(a,b,c) is not abc in general, because the middle exponents have nowhere to go. Always check the count of arguments before you reach for the product shortcut.

Figure. At the prime 2, the two exponents are 4 and 2. HCF keeps the shorter bar and LCM the longer; together they use each unit of exponent exactly once, which is why HCF × LCM recovers the product of the two numbers. The same min/max read at 3 and at 5 finishes the factorisations in the ledger.

How it works

  1. Factor both numbersWrite each as a product of prime powers, lining the primes up in columns.
  2. Min for HCF, max for LCMAt each prime, HCF keeps the smaller exponent and LCM the larger; a missing prime is exponent 0.
  3. Check with the productMultiply HCF by LCM and confirm you recover ab — the check catches a mis-read exponent in one line.

HCF and LCM of 48 and 180

Find \mathrm{HCF}(48,180) and \mathrm{LCM}(48,180), and verify the product identity.

  • 48 = 2⁴ · 3¹, 180 = 2² · 3² · 5¹primes 2, 3, 5
  • HCF takes mins: 2² · 3¹ · 5⁰12
  • LCM takes maxes: 2⁴ · 3² · 5¹720
  • HCF × LCM = 12 × 720, and 48 × 180both 8640

Pro tip. If the question gives HCF and one number and asks for LCM, rearrange: LCM = ab / HCF. That is the product identity solved for the unknown, and it is faster than rebuilding both factorisations when one side is already known.

HCF(a,b) × LCM(a,b) = ab holds
  1. For any finite set of positive integers
  2. For exactly two positive integers
  3. Only when a and b are coprime

The prime-exponent argument pairs min with max at each prime, which adds cleanly for two numbers and leaves middle exponents stranded for three or more. Coprime is a special case (HCF = 1, so LCM = ab) but the identity does not require it — 48 and 180 share factors and still satisfy 12 × 720 = 8640.

5Remainders via Fermat and Euler

Fermat's Little Theorem says a^{p-1}\equiv 1\pmod{p} for a prime p that does not divide a. Euler's theorem generalises it: a^{\phi(n)}\equiv 1\pmod{n} whenever \gcd(a,n)=1, where \phi(n)=n\prod_{p\mid n}(1-1/p) counts the integers up to n that are coprime to n.

The exam move is always the same: reduce the base modulo n, collapse the exponent modulo \phi(n) (or modulo the base's cycle when that is shorter), then compute the small residue. For a power tower, peel from the base upward — reduce the base first, then the exponent modulo the cycle you just found.

Figure. Powers of 4 modulo 7 walk this three-node cycle. The tower example lands on remainder 1 for the exponent, which names the node 4 — the same residue the ledger reaches. Fermat's period 6 would also work, but the cycle you read off the powers is shorter and is what the figure shows.

How it works

  1. Reduce the baseReplace a by a \bmod n before touching the exponent.
  2. Find the cycle or φ(n)For a prime modulus use p-1; otherwise compute \phi(n), or read the cycle of the reduced base by direct powers.
  3. Collapse the exponentReduce the exponent modulo that period, treating a remainder of 0 as a full period, then evaluate the small power.

Remainder of a tower of powers

Find the remainder when 32^{32^{32}} is divided by 7.

  • 32 ≡ 4 (mod 7), so need 4^{32^{32}} (mod 7)base reduced
  • 4¹ ≡ 4, 4² ≡ 2, 4³ ≡ 1 (mod 7)cycle length 3
  • 32 ≡ −1 (mod 3), so 32^{32} ≡ (−1)^{32} ≡ 1 (mod 3)exponent ≡ 1
  • 4^{32^{32}} ≡ 4¹ (mod 7)remainder 4

Pro tip. Peel the tower from the base upward: reduce the base modulo n, then the exponent modulo the base's cyclicity. Fermat would have given φ(7) = 6 here, but the actual cycle of 4 mod 7 is 3, which is shorter — and the shorter period is always legal when you have verified it by direct powers.

By Fermat, 3^{100} \bmod 7 equals
  1. 1
  2. 4
  3. 3

7 is prime and does not divide 3, so 3⁶ ≡ 1 (mod 7). Write 100 = 6×16 + 4, hence 3¹⁰⁰ ≡ 3⁴ = 81 ≡ 4 (mod 7). Option 1 is 3⁶ itself, which is the theorem rather than the residue asked for; option 3 is the unreduced base.

6Trailing zeroes in n!

A trailing zero is a factor of 10, and a factor of 10 is a 2 paired with a 5. Inside n! the 2s vastly outnumber the 5s, so the number of zeroes is simply the number of 5s available — Legendre's formula \sum_{i\ge 1}\lfloor n/p^i\rfloor at p=5.

Count them in a ladder: \lfloor n/5\rfloor picks up one 5 from each multiple of 5, \lfloor n/25\rfloor picks up the second 5 that every multiple of 25 secretly carries, \lfloor n/125\rfloor the third, and so on until the term is zero. Forgetting the higher rungs is the only mistake this question ever tests.

Figure. Each trailing zero is a factor 10=2\times 5; fives are scarcer, so sum \lfloor n/5\rfloor+\lfloor n/25\rfloor+\lfloor n/125\rfloor+\cdots until the floor vanishes.

The ladder, on two examples
Rung100!250!
⌊n/5⌋2050
⌊n/25⌋410
⌊n/125⌋02
Zeroes2462

Trailing zeros of a factorial

How many trailing zeros does 250! have?

  • ⌊250/5⌋50
  • ⌊250/25⌋10
  • ⌊250/125⌋2
  • ⌊250/625⌋ = 0, so stop; total 50 + 10 + 262 zeroes

Pro tip. Never count 2s for trailing zeros; the count of 5s alone gives the answer. Read the rungs for what they mean: the first row counts 5, 10, 15, … once each, and the second goes back for the extra 5 that 25, 50, 75, … were holding.

The number of zeroes at the end of 30! is
  1. 6
  2. 7
  3. 5

⌊30/5⌋ = 6 counts one 5 each from 5, 10, 15, 20, 25 and 30 — but 25 = 5 × 5 carries a second one, which ⌊30/25⌋ = 1 picks up. Total 7. Stopping at the first rung gives 6 and is what the question is fishing for.

Notes

  • Divisibility tests: A number is divisible by 8 if its last three digits form a multiple of 8, by 9 if its digit sum is a multiple of 9, and by 11 if the alternating sum of digits is a multiple of 11.
  • Number of factors: If N=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}, then the count of divisors is (a_1+1)(a_2+1)\cdots(a_k+1), and their sum is \prod_i \frac{p_i^{a_i+1}-1}{p_i-1}.
  • Remainder theorems: Fermat's Little Theorem gives a^{p-1}\equiv 1 \pmod{p} for a prime p with p\nmid a, and Euler's theorem generalizes it to a^{\phi(n)}\equiv 1 \pmod{n} whenever \gcd(a,n)=1.
  • HCF-LCM relation: For any two positive integers, \text{HCF}(a,b)\times\text{LCM}(a,b)=a\times b, an identity that holds only for exactly two numbers.
  • Trailing zeros: The highest power of a prime p dividing n! is given by Legendre's formula \sum_{i\ge1}\left\lfloor\frac{n}{p^i}\right\rfloor, and the number of trailing zeros of n! is this sum for p=5.

Formulas

  • Number of divisors: d(N)=(a_1+1)(a_2+1)\cdots(a_k+1)
  • Sum of divisors: \sigma(N)=\prod_i \frac{p_i^{a_i+1}-1}{p_i-1}
  • Euler's totient: \phi(N)=N\prod_{p\mid N}\left(1-\frac{1}{p}\right)
  • HCF-LCM product: \text{HCF}(a,b)\cdot\text{LCM}(a,b)=ab
  • Highest power of prime p in n!: \sum_{i=1}^{\infty}\left\lfloor\frac{n}{p^i}\right\rfloor
  • Fermat's Little Theorem: a^{p-1}\equiv 1 \pmod{p} for prime p,\ \gcd(a,p)=1

Exam traps & shortcuts

  • For the unit digit of a^b, reduce the exponent modulo the base's cyclicity: 2,3,7,8 have cycle 4; 4,9 have cycle 2; 0,1,5,6 stay constant.
  • To find the remainder of a huge power, first collapse the exponent modulo \phi(n) using Euler's theorem, then compute the small residue directly.
  • The number of trailing zeros of n! equals the power of 5 it contains, i.e. \lfloor n/5\rfloor+\lfloor n/25\rfloor+\cdots, since factors of 5 are scarcer than factors of 2.
  • A perfect square has an odd number of factors, so any divisor count that is odd flags a perfect square instantly.

Reference tables

Reduce the exponent modulo the cycle length; a remainder of 0 lands on the last entry.

Unit-digit cycles
Unit digitCycleLength
0, 1, 5, 6constant1
4, 94,6 / 9,12
2, 3, 7, 82,4,8,6 / 3,9,7,1 / 7,9,3,1 / 8,4,2,64

Prime-power form unlocks the rest; φ and Legendre are the CAT-specific tools.

Formulas to carry
QuantityFormula
Divisor countd(N)=(a_1+1)\cdots(a_k+1)
Divisor sum\sigma(N)=\prod_i (p_i^{a_i+1}-1)/(p_i-1)
Euler's totient\phi(N)=N\prod_{p\mid N}(1-1/p)
HCF–LCM product\mathrm{HCF}(a,b)\cdot\mathrm{LCM}(a,b)=ab (two numbers)
5s in n!\sum_{i\ge 1}\lfloor n/5^i\rfloor
Fermata^{p-1}\equiv 1\pmod{p} for prime p\nmid a

Recap

Six pegs. Each is the move the question is actually testing.

Divisibility
Composite divisibility: split into coprime factors, never into factors that share a prime.
Divisors
Divisor count is each exponent plus one, multiplied; odd count means a perfect square.
Unit digits
Unit-digit cycles: remainder 0 lands on the last entry, not the first.
HCF × LCM
HCF × LCM = ab for exactly two positive integers; three or more break it.
Fermat / Euler
Remainders of powers: reduce the base, then collapse the exponent modulo φ(n) or the verified cycle.
Trailing zeroes
Trailing zeroes in n! equal the 5s from Legendre's ladder — never bother counting 2s.

Practise Number System and Number Theory

Reading is free and needs no account. Practice, mocks and progress live in the app.

  • 21 exam-style questions on this topic, with explanations
  • A 10-question practice set that ends the chapter
  • Timed mocks scored with the real marking scheme
  • Readiness tracked per topic, kept on your device
Continue with Google — freeNo card, no trial. Works offline once installed.