← Vijayastra विजयास्त्रNumber System

Chapter 1

Number System

The chapter where maths begins: every later chapter quietly uses its divisibility, remainders and factors.

Look, Number System is the first chapter of this book for a reason. Every other chapter is made of numbers, and this one teaches you how numbers behave: which number divides which, what is left over after a division, how many factors a number has, and how the last digit of a huge power can be found in one line. LCM and HCF, Simplification, Indices, even Time and Work and Algebra keep borrowing these ideas.

In SSC papers this chapter shows up in two forms. The first is direct: "which number is divisible by 11", "find the missing digit", "what is the remainder", "is √7 rational". If your rules are clear, these are free marks. The second form is the CGL-level twist: remainders of big powers, factors with conditions, missing digits with two unknowns, counting numbers with but not. They look scary, yet they stand on the same few rules.

So we will proceed in order. First the kinds of numbers and the basic methods: even and odd, prime factorisation, squares and cubes. After that, one type at a time, from classifying numbers and place value up to remainders, factors, factorials, series and number puzzles.

Note: do not just read the divisibility rules; test each one on two or three numbers of your own. Once the rules of 8 and 11 come to you without effort, half of this chapter can be solved in one line.

Digits, numbers and the number line

We write every number with just ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. These are called digits. A number is a string of digits, and the position of each digit decides its value. That is why 52 and 25 are different numbers even though the digits are the same.

Now draw a straight line. Mark 0 in the middle, 1, 2, 3, … to the right and −1, −2, −3, … to the left. This is the number line. Every number you will meet in this book (7, −3, 25, 0.75, √2, π) has exactly one point on this line. Numbers to the right are bigger and numbers to the left are smaller. So −10 is smaller than −2, even though 10 is bigger than 2.

[[fig:0]]

Two small facts that are often asked:

  • 0 is neither positive nor negative. It is the dividing point.
  • Moving right means adding, moving left means subtracting. If Radhika is at −5 on the number line and moves 8 units right, she reaches −5 + 8 = 3.

Keep this picture in mind. Integers, rational numbers and irrational numbers are all just different kinds of points on this one line.

Even and odd: how they combine

An even number is divisible by 2: 0, 2, 4, 6, … (form 2k). An odd number leaves remainder 1 when divided by 2: 1, 3, 5, 7, … (form 2k + 1). Negative numbers follow the same idea, so −4 is even and −7 is odd.

The combination rules are worth remembering, because many always divisible by questions are these rules in disguise:

OperationResult
even ± eveneven
odd ± oddeven
even ± oddodd
even × anythingeven
odd × oddodd

Why is odd + odd even? Because (2a + 1) + (2b + 1) = 2(a + b + 1). The two extra 1s join to make a 2.

[[fig:0]]

Two more results come up again and again:

  • Out of any two consecutive numbers, one is even. So the product of two consecutive numbers is always even.
  • Out of any three consecutive numbers, one is divisible by 3 and at least one is even. So the product of three consecutive numbers is always divisible by 6.

Radhika says the sum of three odd numbers can be 30. Is she right? Odd + odd = even, and even + odd = odd, so three odd numbers always give an odd sum. A sum of 30 from three odd numbers is impossible.

Prime factorisation: the master key of this chapter

A prime number has exactly two factors, 1 and itself: 2, 3, 5, 7, 11, 13, … Every whole number greater than 1 can be written as a product of primes, and this product is unique (apart from the order). This is the Fundamental Theorem of Arithmetic, and it opens almost every door in this chapter.

To factorise, keep dividing by the smallest prime that works.
360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45, ÷ 3 = 15, ÷ 3 = 5, ÷ 5 = 1.
So 360 = 23 × 32 × 5.

[[fig:0]]

Always write the result in power form, 2a × 3b × 5c × …, because most types in this chapter read their answer straight from the powers:

  • Is it a perfect square? Check whether all the powers are even.
  • How many factors? Use (a + 1)(b + 1)(c + 1)…
  • How many zeros at the end? Count the pairs of 2 and 5.
  • Is it divisible by 12? Check whether it has at least 22 and 3.

[[fig:1]]

Take 2156. 2156 ÷ 2 = 1078, ÷ 2 = 539, ÷ 7 = 77, ÷ 7 = 11. So 2156 = 22 × 72 × 11, and the whole structure of the number is in front of you in four divisions.

A useful habit: to check whether a number is prime, divide it only by the primes up to its square root. If none of them divides it, the number is prime.

Squares and cubes you must know

Half the questions of this chapter become mental work if these values are at your fingertips. Learn squares up to 30 and cubes up to 15.

[[fig:0]]

nn2nn2nn2
111211832425625
121441936126676
131692040027729
141962144128784
152252248429841
162562352930900
172892457631961
nn3nn3nn3
287343121728
3278512132197
4649729142744
5125101000153375
6216111331208000

Two quick tricks for squares:

  • Numbers ending in 5: for n5, multiply n by (n + 1) and write 25 after it. For 652: 6 × 7 = 42, so 652 = 4225.
  • Near 50 or 100: 482 = (50 − 2)2 = 2500 − 200 + 4 = 2304, and 1032 = 10000 + 600 + 9 = 10609.

Keep one identity ready from now on: a2 − b2 = (a + b)(a − b). It turns many square questions into a simple multiplication.

[[fig:1]]

Type 1

Types of numbers: natural to real, rational and irrational, decimals

Every number belongs to a family, and the families sit inside one another like boxes inside boxes. Learn the boxes once and a classification question takes you a moment.

  • Natural numbers (N): 1, 2, 3, 4, …, the counting numbers. Note that 0 is not a natural number.
  • Whole numbers (W): 0, 1, 2, 3, …, that is, natural numbers along with 0.
  • Integers (Z): …, −3, −2, −1, 0, 1, 2, 3, …, whole numbers along with the negatives.
  • Rational numbers (Q): any number that can be written as pq, where p and q are integers and q ≠ 0. Every integer is rational (7 = 71), and so are 34, −2.5 and 0.333…
  • Irrational numbers: real numbers that can NOT be written as pq: √2, √5, π, 2 + √3. For a non-negative integer n, √n is rational exactly when n is a perfect square; otherwise it is irrational, so the square root of every prime is irrational. For a fraction in lowest terms, both the numerator and the denominator must be perfect squares (√0.25 = 12 is rational).
  • Real numbers (R): rational and irrational together, which means every point of the number line.

So N ⊂ W ⊂ Z ⊂ Q ⊂ R, and the irrationals sit in R outside Q. A number is either rational or irrational, never both. Hence the intersection of the rationals and the irrationals is the empty set, and their union is the set of real numbers.

[[fig:0]]

What lies outside the real numbers? Square roots of negative numbers such as √-4. No real number has a negative square, so these are called imaginary numbers, and numbers of the form a + ib are complex numbers. The real numbers are a subset of the complex numbers, not the other way round.

The decimal tells you the family. Write the fraction in lowest terms and look at the denominator:

  • If the denominator has no prime factor other than 2 and 5, the decimal terminates. 740 = 0.175 because 40 = 23 × 5.
  • If the denominator has any other prime (3, 7, 11, …), the decimal never ends but repeats. 512 = 0.41666… because 12 has a 3.
  • A repeating decimal is pure recurring if the repetition starts right after the decimal point (0.27), and mixed recurring if a few digits come first and the repetition starts later (0.46).
  • Terminating and repeating decimals are rational. Non-terminating, non-repeating decimals are irrational.

Formula: pq (lowest terms) terminates ⇔ q = 2m × 5n
Pure recurring: 0.ab = ab99; Mixed recurring: 0.ab = ab − a90

[[fig:1]]

What happens when you combine them (closure):

  • rational ± rational and rational × rational are always rational. Rational ÷ non-zero rational is rational.
  • rational ± irrational is always irrational. Non-zero rational × irrational is irrational.
  • irrational + irrational can be either. √3 + √3 = 2√3 is irrational, but √3 + (−√3) = 0 is rational. Products behave the same way: √2 × √8 = 4.

Formula: rational ± irrational = irrational; non-zero rational × irrational = irrational

Radhika wants to know whether 975 terminates. First reduce it: 975 = 325, and 25 = 52. Only 5s are left in the denominator, so it terminates: 325 = 0.12. The 3 in 75 disappeared after cancelling, which is exactly why you reduce first.

Formula: N ⊂ W ⊂ Z ⊂ Q ⊂ R; Irrational = R − Q; Q ∩ Irrational = ∅; Q ∪ Irrational = R

Type 2

Place value, face value, the number line and binary numbers

In the number 47,382 the digit 7 is written once, but it means seven thousand. That is the idea of place value.

  • Face value of a digit is the digit itself. The face value of 7 in 47,382 is 7.
  • Place value = face value × value of its place. The place value of 7 in 47,382 = 7 × 1000 = 7000. The place value of 0 is always 0, wherever it sits.

[[fig:0]]

Forming numbers from given digits. For the largest number, arrange the digits in descending order; for the smallest, arrange them in ascending order. A number cannot start with 0, though, so put the smallest non-zero digit first and the 0 right after it. With the digits 4, 0, 8, 1: largest = 8410, smallest = 1048.

Counting the digits used to write numbers. From 1 to 9 there are 9 one-digit numbers, from 10 to 99 there are 90 two-digit numbers, and from 100 to 999 there are 900 three-digit numbers. So writing 1 to 99 uses 9 × 1 + 90 × 2 = 189 digits. Beyond that, add 3 digits for every three-digit number.

Formula: Digits from 1 to n (n three-digit): 9 + 180 + 3(n − 99)

Integers on the number line. A movement upward or to the right is +, downward or to the left is −. A rise from −6 to +5 is a rise of 5 − (−6) = 11 units. The rule is change = final − initial, with signs.

Formula: Change on the number line = final − initial

[[fig:1]]

Binary numbers. Our usual system works in base 10 (place values 1, 10, 100, …). The binary system works in base 2: it uses only the digits 0 and 1, and the place values from the right are 1, 2, 4, 8, 16, 32, 64, 128, …

  • Binary → decimal: add the place values wherever there is a 1. 1011 = 8 + 0 + 2 + 1 = 11.
  • Decimal → binary: break the number into powers of 2. 45 = 32 + 8 + 4 + 1 ⇒ 101101.
  • A binary number made only of 1s is one less than a power of 2: 1111 = 16 − 1 = 15, and eight 1s = 256 − 1 = 255.

Formula: Place value = face value × place (1, 10, 100, …); place value of 0 is 0
Binary place values: 1, 2, 4, 8, 16, 32, 64, 128, 256, …

[[fig:2]]

Radhika has the digits 3, 0, 7, 5 and wants the smallest four-digit number. Ascending order is 0, 3, 5, 7, but 0 cannot lead, so she writes 3 first and then 0. The number is 3057.

Octal and hexadecimal numbers. The binary idea works for any base. In the octal system the base is 8, the digits are 0 to 7, and the place values from the right are 1, 8, 64, 512, … In the hexadecimal system the base is 16 and the digits are 0 to 9 followed by A = 10, B = 11, C = 12, D = 13, E = 14, F = 15; the place values are 1, 16, 256, …

[[fig:3]]

  • To decimal: multiply each digit by its place value and add. Octal 345 = 3 × 64 + 4 × 8 + 5 = 229. Hexadecimal 2F = 2 × 16 + 15 = 47.
  • From decimal: divide repeatedly by the base and read the remainders from the bottom up. 100 ÷ 8 = 12 remainder 4, 12 ÷ 8 = 1 remainder 4, 1 ÷ 8 = 0 remainder 1, so 100 is 144 in octal.
  • Binary shortcut: group the bits in threes from the right for octal, and in fours for hexadecimal. 101110 = 101 | 110 = 5 | 6 = octal 56; 10101111 = 1010 | 1111 = A | F = hexadecimal AF.

How many times does a digit appear? Count place by place. From 1 to 99, each digit from 1 to 9 appears 20 times (10 times as a unit digit and 10 times as a tens digit), while 0 appears only 9 times (in 10, 20, …, 90). From 1 to 999, each digit from 1 to 9 appears 300 times and 0 appears 189 times. In general, from 1 to 10k − 1 each digit from 1 to 9 appears k × 10k−1 times.

Formula: From 1 to 10k − 1: each digit 1 to 9 appears k × 10k−1 times (0 appears 9 times up to 99, 189 times up to 999)

For a range such as 1 to 400, the unit and tens places give 20 appearances of each digit per 100 numbers, that is 4 × 20 = 80 in all. The hundreds place then adds more: the digit 3 is the hundreds digit of all 100 numbers from 300 to 399, so it appears 80 + 100 = 180 times. The digit 5 appears 80 times, and the digit 4 appears 80 + 1 = 81 times (the extra one is 400 itself).

Type 3

Prime, composite and co-prime numbers

A prime number has exactly two different factors: 1 and itself. A composite number has more than two factors. And 1 is neither prime nor composite, because it has only one factor.

Learn the primes up to 100 by heart. There are 25 of them:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

[[fig:0]]

RangePrimesCount
1–102, 3, 5, 74
11–2011, 13, 17, 194
21–3023, 292
31–4031, 372
41–5041, 43, 473
51–6053, 592
61–7061, 672
71–8071, 73, 793
81–9083, 892
91–100971

A few facts settle many questions:

  • 2 is the only even prime. Every other prime is odd. So if three primes add up to an even number, one of them must be 2 (odd + odd + odd is odd).
  • Every prime greater than 3 is of the form 6k ± 1 (29 = 6 × 5 − 1, 31 = 6 × 5 + 1). The reverse is not true: 25 = 6 × 4 + 1 is not prime.
  • To test whether a number is prime, divide it by the primes up to its square root. For 221, √221 ≈ 14.9, so test 2, 3, 5, 7, 11 and 13. Since 221 = 13 × 17, it is composite. Watch out for 91 (7 × 13), 119 (7 × 17), 133 (7 × 19), 143 (11 × 13) and 187 (11 × 17): they look prime, but they are not.

Formula: Primes up to 100: 25 (up to 50: 15); 2 is the only even prime; 1 is neither prime nor composite
Prime test for N: check primes ≤ √N
Every prime > 3 is of the form 6k ± 1

Co-prime numbers are two numbers whose only common factor is 1, that is, their HCF is 1. They need not be prime themselves; 8 and 15 are co-prime. Any two consecutive numbers are co-prime, and 1 is co-prime with every number. Two even numbers can never be co-prime, because 2 divides both.

Formula: Co-prime ⇔ HCF = 1; consecutive numbers are always co-prime

[[fig:1]]

Twin primes are primes that differ by 2: (3, 5), (11, 13), (17, 19), (41, 43), (71, 73).

When the product of two primes is given, the smaller prime cannot be bigger than the square root of the product, so start testing from the primes just below the square root. Suppose Radhika is told that two primes multiply to 247. √247 ≈ 15.7, so she tries the primes just below 15.7. The first one, 13, divides 247, and 247 = 13 × 19.

Euler's totient: how many numbers up to N are co-prime to N. Write N = pa qb …; then
φ(N) = N × (1 − 1p) × (1 − 1q) × …
Only the different primes matter. For 100 = 22 × 52: φ(100) = 100 × 12 × 45 = 40, so 40 numbers from 1 to 100 are co-prime to 100 (exactly those divisible by neither 2 nor 5). For a prime p, φ(p) = p − 1. For N > 2 the numbers co-prime to N pair up as r and N − r, so their sum is N × φ(N)2. For 12 the co-primes are 1, 5, 7, 11 and the sum is 12 × 4 ÷ 2 = 24.

Formula: φ(N) = N(1 − 1p)(1 − 1q)…; φ(p) = p − 1; sum of the numbers below N co-prime to N = N × φ(N)2 (N > 2)

Two results on primes. For every prime p > 3, p2 − 1 = (p − 1)(p + 1) is divisible by 24. Since p is odd, p − 1 and p + 1 are consecutive even numbers, so their product is divisible by 8; since p is not a multiple of 3, one of them is a multiple of 3. Check: 72 − 1 = 48 = 24 × 2 and 112 − 1 = 120 = 24 × 5. Also, 3, 5, 7 is the only triple of primes of the form p, p + 2, p + 4, because one of any three such numbers is a multiple of 3.

Formula: Prime p > 3 ⇒ p2 − 1 is divisible by 24; 3, 5, 7 is the only triple p, p + 2, p + 4 of primes

Type 4

Perfect squares and square roots

A perfect square is a number of the form n2 where n is an integer: 1, 4, 9, 16, 25, … Three tools settle almost every question of this type.

1. The prime-power test. A number is a perfect square exactly when every prime in its factorisation has an even power. 3600 = 24 × 32 × 52: all powers are even, so it is a square (602). 1200 = 24 × 3 × 52: the power of 3 is odd, so it is not.
The same factorisation tells you what to multiply or divide by. To make 1200 a perfect square, multiply by the prime with the odd power: 1200 × 3 = 3600. To make it a square by division, divide by 3: 1200 ÷ 3 = 400.

Formula: N = pa qb … is a perfect square ⇔ a, b, … all even

[[fig:0]]

2. The unit-digit test, to reject options quickly. A perfect square can end only in 0, 1, 4, 5, 6 or 9. A square never ends in 2, 3, 7 or 8. Also:

  • If a square ends in 0, it ends in an even number of zeros (100, 2500, 90000).
  • If a square ends in 5, its tens digit is 2 (25, 225, 625).
  • If a square ends in 6, its tens digit is odd (16, 36, 196, 576).

Formula: A square ends only in 0, 1, 4, 5, 6, 9; never in 2, 3, 7, 8
(n5)2 = n(n + 1) followed by 25

Unit digit of n1 or 92 or 83 or 74 or 650
Unit digit of n2149650

[[fig:1]]

3. Squares near a number (least number to add or subtract). Estimate the square root, then find the two squares on either side of the number. Say Radhika wants the least number to add to 2000 to get a perfect square. 442 = 1936 and 452 = 2025, so she adds 2025 − 2000 = 25. If she had to subtract instead, she would subtract 2000 − 1936 = 64.

[[fig:2]]

Counting squares in a range. The squares from a2 to b2 are a2, (a + 1)2, …, b2, which makes b − a + 1 squares. So count the integers whose squares fall in the range. Between two consecutive squares n2 and (n + 1)2 there are exactly 2n non-square natural numbers.

Formula: Squares from a2 to b2: b − a + 1; non-squares between n2 and (n + 1)2: 2n

Digits in the square root. If a perfect square has n digits, its square root has n2 digits when n is even and n + 12 digits when n is odd. A 6-digit square has a 3-digit root.

Formula: n-digit square ⇒ root has n2 digits (n even) or n + 12 digits (n odd)

A number and its square root. For a question like a number minus its square root is 132, let the root be r. Then r2 − r = 132 ⇒ r(r − 1) = 132 = 12 × 11, so r = 12 and the number is 144. The pattern to spot is a product of two consecutive numbers.

Cube roots of perfect cubes. The unit digit of a cube tells the unit digit of the root, and here every digit has exactly one answer. Learn the table: 1 → 1, 2 → 8, 3 → 7, 4 → 4, 5 → 5, 6 → 6, 7 → 3, 8 → 2, 9 → 9, 0 → 0. Only 2 ↔ 8 and 3 ↔ 7 exchange places.

Formula: Unit digit of cube: 2 ↔ 8, 3 ↔ 7 swap; 0, 1, 4, 5, 6, 9 stay the same

[[fig:3]]

Radhika wants ∛10648. Cut off the last three digits: 10 | 648. The cube ends in 8, so the root ends in 2. The remaining part 10 lies between 23 = 8 and 33 = 27, so the tens digit is the smaller one, 2. The root is 22. Check: 223 = 10648.

For a decimal, the number of decimal places must be a multiple of 3. Take the cube root of the digits and give the answer one third of the places: ∛0.001728 = 0.12, because 6 places become 2 places and 123 = 1728. And ∛2764 = 34.

Type 5

Divisibility rules: testing a number, nearest multiples, least number to add or subtract

A divisibility rule tells you whether one number divides another without doing the full division. Each rule has a reason, and once you see the reason you will not forget the rule.

Rules based on the last digits (powers of 2 and 5). 10 = 2 × 5, 100 = 4 × 25 and 1000 = 8 × 125. So everything except the last one, two or three digits is automatically divisible by these numbers, and only the tail needs checking.

Formula: 2, 4, 8, 16 → last 1, 2, 3, 4 digits; 5, 25, 125 → last 1, 2, 3 digits

DivisorCheck
2last digit even (0, 2, 4, 6, 8)
4last two digits divisible by 4
8last three digits divisible by 8
16last four digits divisible by 16
5last digit 0 or 5
25last two digits 00, 25, 50 or 75
125last three digits divisible by 125
10last digit 0

[[fig:0]]

Rules based on the digit sum (3 and 9). Each of 10, 100, 1000, … leaves remainder 1 when divided by 3 or 9. So a number leaves the same remainder as the sum of its digits. Divisible by 3 ⇔ digit sum divisible by 3; divisible by 9 ⇔ digit sum divisible by 9.

Rule of 11. Add the digits in the odd places (counting from the right), add the digits in the even places, and take the difference. If the difference is 0 or a multiple of 11, the number is divisible by 11. For 72919: odd places 9 + 9 + 7 = 25, even places 1 + 2 = 3, difference 22, so it is divisible.

Formula: 3, 9 → digit sum; 11 → (sum of odd-place digits) − (sum of even-place digits) = 0 or multiple of 11

[[fig:1]]

Rule of 7, 11 and 13 together. 7 × 11 × 13 = 1001. Make groups of three digits from the right and find the alternating sum of the groups. If that result is divisible by 7, 11 or 13, so is the number. 371371 gives groups 371 | 371 and 371 − 371 = 0, so it is divisible by 7, 11 and 13. For 1,001,077 the groups are 1 | 001 | 077 and 77 − 1 + 1 = 77 = 7 × 11, so it is divisible by 7 and 11 but not by 13.

Formula: 7, 11, 13 → alternating sum of 3-digit groups from the right (1001 = 7 × 11 × 13)

Composite divisors: split into co-prime parts. A number is divisible by 6 if it is divisible by both 2 and 3; by 12 if by 3 and 4; by 15 if by 3 and 5; by 18 if by 2 and 9; by 24 if by 3 and 8; by 36 if by 4 and 9; by 72 if by 8 and 9; by 88 if by 8 and 11. The two parts must be co-prime. 24 = 4 × 6 does NOT work, because 4 and 6 share a 2 (12 is divisible by both 4 and 6 but not by 24).

Formula: Composite divisor = product of co-prime parts: 6 = 2 × 3, 12 = 3 × 4, 18 = 2 × 9, 24 = 3 × 8, 36 = 4 × 9, 72 = 8 × 9, 88 = 8 × 11

Nearest multiples and the least number to add or subtract. Divide the number by the divisor and look at the remainder r.

  • Least number to subtract = r.
  • Least number to add = divisor − r (if r = 0, nothing needs to be added; the answer is 0 unless the question asks for the least positive number).
  • Largest n-digit multiple = (largest n-digit number) − r.
  • Smallest n-digit multiple = (smallest n-digit number) + (divisor − r), unless r = 0.

Formula: N ÷ d leaves r ⇒ subtract r, or add (d − r)

Radhika wants the largest 4-digit number divisible by 37. 9999 ÷ 37 leaves remainder 9999 − 37 × 270 = 9, so the answer is 9999 − 9 = 9990.

[[fig:2]]

Digital root: add the digits again and again. Add the digits of a number. If the answer still has two or more digits, add its digits again, and go on till one digit is left. That last digit is the digital root. For 7865: 7 + 8 + 6 + 5 = 26, and 2 + 6 = 8.

[[fig:3]]

The digital root of N is the remainder when N is divided by 9 (write 9 when the remainder is 0). The reason is simple: 10, 100, 1000, … all leave remainder 1 on division by 9, so a number and its digit sum leave the same remainder.

Formula: Digital root of N = remainder of N ÷ 9 (9 if the remainder is 0)

This gives a quick check for answers. The digital root of a sum or a product is found from the digital roots of the numbers. Radhika multiplies 47 × 38 and gets 1786. The digital roots are 2 and 2, so the product must have digital root 4. For 1786 we get 1 + 7 + 8 + 6 = 22 and 2 + 2 = 4 ✓. If an option has a different digital root, it is wrong at once.

Two more uses: a perfect square always has digital root 1, 4, 7 or 9, so a number with digital root 2, 3, 5, 6 or 8 is never a perfect square. And for a big power, find the digital root of the base and follow its cycle: 4, 7, 1, 4, 7, 1 … for the powers of 4 (since 43 = 64 has digital root 1).

Testing with a multiplier (the osculator method). For a divisor that ends in 9 or 1, cut off the last digit, multiply it by a small fixed number k, and then ADD it to the rest of the number (divisor ending in 9) or SUBTRACT it from the rest (divisor ending in 1). Repeat until the number is small enough to see. For a divisor M ending in 9, k = (M + 1) ÷ 10 and you add; for M ending in 1, k = (M − 1) ÷ 10 and you subtract. The reason, for M = 19: if N = 10 × rest + last digit, then 10 × (rest + 2 × last digit) = N + 19 × last digit, so the new number is divisible by 19 exactly when N is.

Formula: Osculator: divisor M ending in 9 ⇒ add (last digit × M + 110) to the rest; ending in 1 ⇒ subtract (last digit × M − 110). Steps: 7: −2, 13: +4, 17: −5, 19: +2, 23: +7, 29: +3, 31: −3, 41: −4

For divisors ending in 3 or 7, use a multiple of the divisor that ends in 9 or 1:

DivisorMultiple usedStep
721subtract 2 × last digit
1339add 4 × last digit
1751subtract 5 × last digit
1919add 2 × last digit
2369add 7 × last digit
2929add 3 × last digit
3131subtract 3 × last digit
4141subtract 4 × last digit

Test 2,793 for 19: 279 + 2 × 3 = 285, then 28 + 2 × 5 = 38 = 19 × 2, so it is divisible. Test 4,018 for 7: 401 − 2 × 8 = 385, then 38 − 2 × 5 = 28 = 7 × 4, so it is divisible.

Rules for 99, 999 and 101. 100 leaves remainder 1 on division by 99, so a number and the sum of its two-digit groups (made from the right) leave the same remainder on division by 99, and so also by 3, 9, 11 and 33. For 7,425: 74 + 25 = 99, so it is divisible by 99. In the same way 1000 leaves remainder 1 on division by 999, so add the three-digit groups: 2,997 gives 2 + 997 = 999, so it is divisible by 999, and therefore by 27 and 37. For 101, the number 100 leaves remainder −1, so take the alternating sum of the two-digit groups from the right: 10,302 gives 02 − 03 + 1 = 0, so it is divisible by 101.

Formula: 99 → sum of two-digit groups; 999 → sum of three-digit groups; 101 → alternating sum of two-digit groups (from the right)

A shortcut for 8. 100 leaves remainder 4 on division by 8, and 1000 is a multiple of 8. So look at the last two digits; if the hundreds digit is odd, add 4 to them first, and if it is even, use them as they are. For 3,176 the hundreds digit 1 is odd and 76 + 4 = 80, which is divisible by 8 ✓. For 5,364 the hundreds digit 3 is odd and 64 + 4 = 68, which is not divisible by 8, so the number is not either.

Formula: 8 → last two digits, after adding 4 if the hundreds digit is odd

Type 6

Missing digits: making a number divisible

In this type one digit (or two) of the number is hidden, and you are told that the number is divisible by something. Turn the divisibility rule into a small equation in the hidden digit. A digit can only be 0 to 9, and that limit does half the work for you.

Formula: Unknown digit d: 0 ≤ d ≤ 9 (leading digit ≥ 1)

Step 1: break the divisor into co-prime parts. 72 = 8 × 9, 88 = 8 × 11, 36 = 4 × 9, 40 = 8 × 5, 33 = 3 × 11, 15 = 3 × 5, 105 = 3 × 5 × 7.

Formula: Big divisor → co-prime parts: 40 = 8 × 5, 44 = 4 × 11, 72 = 8 × 9, 88 = 8 × 11, 99 = 9 × 11

Step 2: apply the last-digits rule first. The rules of 2, 4, 5 and 8 involve only the tail, so they usually fix the last digit straight away, or narrow it to two or three values.

Step 3: then apply the digit-sum rule or the rule of 11. These involve every digit. Write the sum of the known digits, add the unknown, and see which values make it a multiple of 3, 9 or 11.

Formula: Rule of 9 / 3: (known digit sum + d) = multiple of 9 / 3

[[fig:0]]

Radhika has to fill the blank in 52*6 so that the number is divisible by 9. The known digits add up to 5 + 2 + 6 = 13. The next multiple of 9 is 18, so the digit is 18 − 13 = 5. (Reaching 27 would need the digit 14, which is impossible.) The number is 5256.

[[fig:1]]

Two unknowns. Use one rule to get the possible values of one digit, the other rule for the second digit, and then pick what the question asks for: the maximum sum, the minimum product, or a particular pair. Always list every possibility. In maximum and minimum questions, the first value you find is often not the answer.

Rule of 11 with unknowns. The difference (odd-place sum − even-place sum) can be 0, 11, −11, 22, … With one unknown digit, usually only one of these is reachable. With two unknowns, check both 0 and ±11.

Formula: Rule of 11: (odd-place sum) − (even-place sum) ∈ {…, −11, 0, 11, …}

"Which cannot be the value" questions. Find all the values that work and pick the option outside that list. If the unknown sits inside the last digits that decide divisibility by 4 or 8, write all the multiples in that range and read off the digit.

Type 7

Divisibility of expressions, powers and special number patterns

Sometimes the question gives no ordinary number at all. Instead it gives an expression like 540 + 541 + 542, or a pattern like a six-digit number formed by repeating a three-digit number. Here a few facts about structure do the work that digit rules did earlier.

1. Take the common power out. an + an+1 + an+2 = an(1 + a + a2). So 540 + 541 + 542 = 540 × (1 + 5 + 25) = 540 × 31. It is divisible by 31, by 5, by 31 × 5 = 155, and so on.

Formula: an + an+1 + an+2 = an(1 + a + a2)

[[fig:0]]

2. an − bn and an + bn.

  • an − bn is always divisible by (a − b).
  • an − bn is divisible by (a + b) when n is even.
  • an + bn is divisible by (a + b) when n is odd.

Formula: an − bn ÷ (a − b) always; ÷ (a + b) if n even; an + bn ÷ (a + b) if n odd

Take 96 − 1. Here a = 9, b = 1 and n = 6 is even, so it is divisible by 9 − 1 = 8 and by 9 + 1 = 10. Also 96 − 1 = 813 − 1, so it is divisible by 81 − 1 = 80 as well.

3. Patterns of repeated digits.

  • aaa = a × 111 = a × 3 × 37
  • abab = ab × 101
  • abcabc = abc × 1001 = abc × 7 × 11 × 13
  • A two-digit number plus its reverse: (10a + b) + (10b + a) = 11(a + b), always a multiple of 11. The difference is 9(a − b), always a multiple of 9.

Formula: abcabc = abc × 1001 = abc × 7 × 11 × 13; abab = ab × 101; aaa = a × 3 × 37
ab + ba = 11(a + b); ab − ba = 9(a − b)

[[fig:1]]

4. Shuffling digits. Rearranging the digits does not change the digit sum, so divisibility by 3 and 9 survives any shuffle. Divisibility by 2, 4, 5, 8 and 11 depends on positions, so it may be lost.

5. Sums and differences. If N and k are both divisible by d, then N + k and N − k are divisible by d. If k is not divisible by d, then N + k is not divisible by d either. So when 21 is added to a multiple of 33, the result is still divisible by 3 (because 21 is), but no longer by 11.

6. Consecutive numbers. The product of n consecutive integers is divisible by n! (1 × 2 × … × n). So two consecutive numbers give an even product, three consecutive numbers give a multiple of 6, and n3 − n = (n − 1)n(n + 1) is always divisible by 6.

Formula: Product of n consecutive integers is divisible by n!

Type 8

Counting multiples in a range: divisible by, both, or, but not

How many numbers from 1 to 500 are divisible by 7? You do not list them. From 1 to N, the multiples of d are d, 2d, 3d, …, and their count is the integer part of Nd, written ⌊Nd⌋. From 1 to 500 that is ⌊5007⌋ = 71, since 7 × 71 = 497.

Formula: Multiples of d from 1 to N = ⌊Nd⌋; from a to b = ⌊bd⌋ − ⌊a − 1d⌋

[[fig:0]]

A range that does not start from 1. Count up to the top and subtract the count below the start:
multiples of d from a to b (both included) = ⌊bd⌋ − ⌊a − 1d⌋.
Or use the AP way: (last multiple − first multiple) ÷ d + 1.
For the multiples of 9 from 200 to 300, the first multiple is 207 and the last is 297, so the count is 297 − 2079 + 1 = 11.

Formula: Count = last − firstd + 1

"Between" versus "from … to". Between 100 and 200 normally leaves out the end points; from 100 to 200 or including both keeps them. This matters only if an end point is itself a multiple, so always look at the end points.

Divisible by both a and b. A number divisible by both is divisible by their LCM. When a and b are co-prime the LCM is just a × b: divisible by both 7 and 11 ⇔ divisible by 77. If they share a factor, the LCM is smaller: divisible by both 4 and 6 ⇔ divisible by 12, not 24.

Divisible by a or b (inclusion–exclusion). Count(a) + Count(b) − Count(both). The numbers divisible by both were counted twice, so we remove them once.

Neither a nor b = total − Count(a or b).
Divisible by a but not by b = Count(a) − Count(both).
Divisible by a or b but not by both = Count(a) + Count(b) − 2 × Count(both).

Formula: n(a or b) = n(a) + n(b) − n(both); n(neither) = total − n(a or b)
n(a but not b) = n(a) − n(both); n(exactly one) = n(a) + n(b) − 2 n(both)

[[fig:1]]

Three conditions. Divisible by a or b or c:
n(a) + n(b) + n(c) − n(ab) − n(bc) − n(ca) + n(abc),
where n(ab) counts the numbers divisible by the LCM of a and b, and n(abc) those divisible by the LCM of all three. The numbers divisible by all three were added three times and removed three times, so they must be added back once. From 1 to 100, the numbers divisible by none of 2, 3 and 5 are 100 − (50 + 33 + 20) + (16 + 10 + 6) − 3 = 26 (these are exactly the numbers co-prime to 30).

Formula: n(a or b or c) = Σn(single) − Σn(pair) + n(all three); the overlaps use the LCM

Type 9

Unit digit and cyclicity (and the last few digits)

The unit digit of a product depends only on the unit digits of the numbers being multiplied. In 4,327 × 5,689 only 7 × 9 = 63 matters, so the product ends in 3. Sums and differences follow the same rule: work only with the last digits.

Formula: Unit digit of a product = unit digit of the product of the unit digits

Powers repeat in cycles. Write the powers of 2: 2, 4, 8, 16, 32, 64, … The unit digits are 2, 4, 8, 6, 2, 4, 8, 6, … and they repeat every 4 steps. This is called cyclicity, and every digit has a cycle of length 1, 2 or 4.

Last digitUnit digits of powersCycle length
0, 1, 5, 6always the same digit1
44, 6 (odd power 4, even power 6)2
99, 1 (odd power 9, even power 1)2
22, 4, 8, 64
33, 9, 7, 14
77, 9, 3, 14
88, 4, 2, 64

[[fig:0]]

The method for (…a)n. Take only the last digit a. Divide the power n by 4 and look at the remainder r:

  • r = 1, 2, 3 ⇒ the unit digit is that of ar.
  • r = 0 ⇒ the unit digit is that of a4 (6 for 2, 4, 6, 8 and 1 for 3, 7, 9).

To divide n by 4, you need only the last two digits of n.

Formula: Unit digit of an: r = n mod 4; r ≠ 0 ⇒ ar; r = 0 ⇒ a4

[[fig:1]]

Find the unit digit of 357: 57 = 4 × 14 + 1, so r = 1 and the unit digit is 31 = 3. For 830: 30 = 4 × 7 + 2, so r = 2 and the unit digit is that of 82 = 64, which is 4.

Squares and their unit digits (useful for rejecting options): a square ends only in 0, 1, 4, 5, 6 or 9. A number ending in 1 or 9 has a square ending in 1; ending in 2 or 8 gives 4; ending in 3 or 7 gives 9; ending in 4 or 6 gives 6.

Formula: Cyclicity: 0, 1, 5, 6 → 1; 4, 9 → 2; 2, 3, 7, 8 → 4

Last two or three digits. For a product, keep only the last two (or three) digits of each number and multiply, keeping the last two (or three) digits at every step. The last three digits of 2,345 × 6,789 are the last three digits of 345 × 789 = 272205, that is, 205.

Factorials. From 5! onwards every factorial contains 2 × 5, so every factorial from 5! onwards ends in 0. In 1! + 2! + 3! + … + 100!, only 1! + 2! + 3! + 4! = 33 decides the unit digit, and it is 3.

Formula: n! ends in 0 for every n ≥ 5

Shortcuts for 4, 9 and 5. Powers of 4 and of 9 repeat in a cycle of two, so only odd or even matters: 4odd ends in 4 and 4even in 6; 9odd ends in 9 and 9even in 1. A product of odd numbers that includes a number ending in 5 always ends in 5. When the power is a factorial, note that n! is a multiple of 4 for every n ≥ 4, so an! has the unit digit of a4. For example, 35! = 3120 ends in 1.

Formula: 4odd → 4, 4even → 6; 9odd → 9, 9even → 1; n! is a multiple of 4 for n ≥ 4, so an! ends like a4

Last two digits of a power. If a is co-prime to 10 (it ends in 1, 3, 7 or 9), then a20 always ends in 01. So reduce the power modulo 20 and work with what is left: 345 = (320)2 × 35 ends in the last two digits of 35 = 243, that is 43. If a number ends in 1, write it as 10m + 1; then the last two digits of (10m + 1)n are the last digit of m × n followed by 1. For 2137: m = 2, 2 × 37 = 74, so the tens digit is 4 and the number ends in 41. A number ending in 25 or in 76 keeps that ending in every power: 25n ends in 25 and 76n ends in 76.

Formula: Last two digits: a co-prime to 10 ⇒ a20 ends in 01; (10m + 1)n ends in (last digit of m × n) then 1; 25n → 25, 76n → 76

Type 10

Division algorithm and basic remainders

Every division can be written in one line:

Dividend = Divisor × Quotient + Remainder, with 0 ≤ Remainder < Divisor.

Formula: Dividend = Divisor × Quotient + Remainder; 0 ≤ R < Divisor
Divisor = Dividend − RemainderQuotient

When 47 is divided by 6: 47 = 6 × 7 + 5. Dividend 47, divisor 6, quotient 7, remainder 5. The remainder is always smaller than the divisor, and this one fact settles many find the divisor questions.

[[fig:0]]

Remainder by a rule, without long division.

  • By 2, 4, 8 (or 5, 25, 125): the remainder of the last 1, 2 or 3 digits.
  • By 3 or 9: the remainder of the digit sum. For 5,237 ÷ 9 the digit sum is 17, so the remainder is 17 − 9 = 8.
  • By 11: (sum of odd-place digits − sum of even-place digits), adjusted to lie between 0 and 10.

Divisor of the divisor. If N ÷ D leaves remainder r, and d divides D, then N ÷ d leaves the same remainder as r ÷ d. The reason: N = Dk + r, and Dk is a multiple of d. So if N ÷ 36 leaves 25, then N ÷ 12 leaves the remainder of 25 ÷ 12, which is 1. This works only when d is a factor of D.

Formula: N ÷ D leaves r and d | D ⇒ N ÷ d leaves the remainder of r ÷ d

Remainders of sums and multiples. If A ÷ d leaves a and B ÷ d leaves b, then (A + B) ÷ d leaves the remainder of (a + b), and k × A ÷ d leaves the remainder of k × a. So:

  • If a + b is more than the actual remainder of the sum, the excess is the divisor: d = (a + b) − (remainder of the sum). If a + b equals the remainder of the sum, nothing wrapped around and d is not fixed (remainders 2 and 3 with sum remainder 5 suit every divisor above 5).
  • If N leaves 15 and 10N leaves 6, then 150 and 6 differ by a multiple of d, so d divides 144 and d > 15.

Formula: Remainders a, b; sum leaves s, with a + b > s ⇒ divisor = a + b − s (if a + b = s there is no wrap-around and the divisor is not fixed)

Divisor, quotient and remainder linked. Suppose the divisor is 4 times the quotient and 3 times the remainder, and the remainder is 20. Then divisor = 3 × 20 = 60, quotient = 60 ÷ 4 = 15 and dividend = 60 × 15 + 20 = 920. Find the divisor first, from the remainder.

Two numbers with a given difference. If the difference is 2,000 and larger ÷ smaller gives quotient 5 and remainder 40, then L = 5S + 40 and L − S = 2000 ⇒ 4S + 40 = 2000 ⇒ S = 490.

Successive division. When N is divided by 3, the quotient by 5, and that quotient by 7, work backwards from the last quotient: number = (((last quotient × 7) + r3) × 5 + r2) × 3 + r1.

[[fig:1]]

Radhika divides 2,000 by a number and gets quotient 45 and remainder 20. The divisor is 2000 − 2045 = 198045 = 44.

Type 11

Remainder theorem: products, big powers, negative remainders, Fermat

When the dividend is a huge product or a huge power, we never calculate it. We replace each number by its remainder and work only with small numbers. This is allowed because remainders multiply and add just like the numbers themselves.

1. Product rule. The remainder of (A × B × C) ÷ d equals the remainder of (rA × rB × rC) ÷ d, where rA is the remainder of A ÷ d, and so on. The same is true for sums and differences.

Formula: Rem(A × B ÷ d) = Rem(rA × rB ÷ d); same for sums

2. Negative remainders. When a number is just below a multiple of the divisor, its remainder can be written as negative. 19 ÷ 20 leaves 19, but 19 = 20 − 1, so we can treat it as −1. Powers then become easy: (−1)even = 1 and (−1)odd = −1. If the final answer is negative, add the divisor to make it positive: −1 on division by 20 means remainder 19.

Formula: a ≡ −1 (mod d) ⇒ aeven leaves 1, aodd leaves d − 1
(an + a) ÷ (a + 1) leaves a − 1 (n odd) or 0 (n even)

[[fig:0]]

3. Power rule: look for 1 or −1. For an ÷ d:

  • If a leaves 1, then an leaves 1 for every n.
  • If a leaves −1 (a = d − 1), then an leaves 1 when n is even and d − 1 when n is odd.
  • Otherwise, find a small power of a that leaves 1 or −1, and break n using it.

Take 2100 ÷ 9. Here 23 = 8 = 9 − 1 leaves −1. So 2100 = (23)33 × 2 → (−1)33 × 2 = −2, and the remainder is 9 − 2 = 7.

[[fig:1]]

4. Fermat's little theorem. If p is a prime and a is not a multiple of p, then ap−1 ÷ p leaves remainder 1. So 512 ÷ 13 leaves 1, and 562 = (512)5 × 52 leaves the remainder of 25 ÷ 13, which is 12. (Euler's theorem, a more general version, says aφ(n) ÷ n leaves 1 when a and n are co-prime. For SSC, Fermat and the idea of finding a power that gives ±1 are enough.)

Formula: Fermat: p prime, p ∤ a ⇒ ap−1 ÷ p leaves 1
Euler: a co-prime to n ⇒ aφ(n) ÷ n leaves 1; φ(n) = n(1 − 1p)(1 − 1q)…

5. Remainder of an expression in n. If n ÷ d leaves r, then any polynomial in n, such as n2 + 3n + 1, leaves the same remainder as r2 + 3r + 1. Put the remainder in place of n.

6. Polynomial remainder theorem. When a polynomial f(x) is divided by (x − a), the remainder is f(a). For a divisor (2x + 1), put x = −12.

Standard results (n any natural number):

  • (an + 1) ÷ (a + 1): remainder 0 if n is odd, 2 if n is even (for a > 1).
  • (an − 1) ÷ (a + 1): remainder 0 if n is even.
  • (an + a) ÷ (a + 1): remainder a − 1 if n is odd, 0 if n is even, because an → (−1)n.

7. Wilson's theorem. If p is a prime, then (p − 1)! leaves remainder p − 1 on division by p (that is, (p − 1)! + 1 is divisible by p). So 10! ÷ 11 leaves 10. A useful by-product: (p − 2)! leaves remainder 1, because (p − 1)! = (p − 1) × (p − 2)! and p − 1 behaves like −1. So 11! ÷ 13 leaves 1. If n ≥ p for a prime p, then n! is a multiple of p and leaves 0. The theorem needs p to be prime: for the composite 6, 5! = 120 leaves 0, not 5.

Formula: Wilson: p prime ⇒ (p − 1)! leaves p − 1 and (p − 2)! leaves 1 on division by p; n ≥ p ⇒ n! leaves 0

8. Euler's theorem in use. φ(n) is the number of integers from 1 to n that are co-prime to n (see co-prime numbers). If a and n are co-prime, then aφ(n) ÷ n leaves remainder 1. This works for a composite divisor, where Fermat's theorem cannot be used (Fermat is the case n = p, φ(p) = p − 1). For 7100 ÷ 15: φ(15) = 15 × 23 × 45 = 8, so 78 leaves 1. Now 100 = 8 × 12 + 4, so 7100 leaves the same remainder as 74 = 2401, which is 1.

9. Two different remainders. Find the numbers that leave remainder 3 when divided by 5 and remainder 4 when divided by 7. The divisors are co-prime, so there is exactly one such number below 5 × 7 = 35, and every other one differs from it by a multiple of 35. List the numbers of the form (bigger divisor) × k + (its remainder), here 7k + 4 = 4, 11, 18, …, and test each against the other condition. 18 ÷ 5 leaves 3 ✓. So the numbers are 18, 53, 88, … , that is, 35t + 18. (When divisor − remainder is the same for every divisor, the LCM method of the LCM and HCF chapter is quicker.)

Formula: f(x) ÷ (x − a) leaves f(a)
Remainders r₁ on division by m and r₂ on division by n, with m and n co-prime: the solutions repeat every m × n; list (bigger divisor) × k + its remainder and test each against the other divisor

Type 12

Factors: number, sum and product of divisors, factors with conditions

Every factor of a number is built from the same primes as the number, with powers that are not larger. If N = 23 × 52, a factor looks like 2x × 5y with x = 0, 1, 2, 3 (4 choices) and y = 0, 1, 2 (3 choices). So N has 4 × 3 = 12 factors, and the rest of this type grows from this one picture.

Formula: N = pa qb rc ⇒ number of factors = (a + 1)(b + 1)(c + 1)

[[fig:0]]

Number of factors. If N = pa × qb × rc …, then the number of factors = (a + 1)(b + 1)(c + 1)… This count includes 1 and N. For factors other than 1 and N, subtract 2.

Sum of factors. (1 + p + p2 + … + pa) × (1 + q + … + qb) × …
Take 540 = 22 × 33 × 5. Number of factors = 3 × 4 × 2 = 24. Sum of factors = (1 + 2 + 4)(1 + 3 + 9 + 27)(1 + 5) = 7 × 40 × 6 = 1680.

Formula: Sum of factors = (1 + p + … + pa)(1 + q + … + qb)…

Product of factors. Nd2, where d is the number of factors (factors pair up as a × Na).

Formula: Product of factors = Nd2 (d = number of factors)

Factors with a condition: fix the powers.

  • Odd factors: allow only the power 0 for 2. For 540 that gives (3 + 1)(1 + 1) = 8 odd factors. Even factors = total − odd = 24 − 8 = 16.
  • Perfect-square factors: every power must be even. For pa the even choices are 0, 2, 4, …, which gives ⌊a2⌋ + 1 choices.
  • Factors divisible by k: put k's primes into the factor first and let the remaining powers vary. For divisible by 18 but not by 36, the power of 2 must be exactly 1 and the power of 3 at least 2.

Formula: Odd factors: ignore the power of 2; even = total − odd
Perfect-square factors: ∏(⌊a2⌋ + 1); exactly 3 factors ⇔ (prime)2

[[fig:1]]

Numbers with an exact number of factors.

  • Exactly 2 factors ⇔ prime.
  • Exactly 3 factors ⇔ square of a prime (4, 9, 25, 49, …).
  • An odd number of factors ⇔ perfect square.

"n divides N and leaves remainder r". Then n divides N − r exactly and n > r. So count the factors of N − r that are greater than r.

More results from the power form. Let N = pa qb … have d factors.

  • Ways to write N as a product of two factors (order ignored) = d2, or d + 12 if N is a perfect square. If the order matters, the count is d.
  • Ways to write N as a product of two co-prime factors (order ignored) = 2k−1, where k is the number of different primes in N.
  • Sum of odd factors = the sum formula with the prime 2 left out. Sum of even factors = total sum − sum of odd factors.
  • Sum of the reciprocals of all factors = sum of factorsN.

Formula: Ways as a product of two factors = d2 (d + 12 for a perfect square); as two co-prime factors = 2k−1 (k = number of different primes)
Sum of even factors = total sum − sum of odd factors; sum of reciprocals of all factors = sum of factorsN

For 540 = 22 × 33 × 5: d = 24, so there are 12 ways to write it as a product of two factors. With k = 3 there are 22 = 4 co-prime pairs: (1, 540), (4, 135), (5, 108), (20, 27). The sum of odd factors is (1 + 3 + 9 + 27)(1 + 5) = 240, so the sum of even factors is 1680 − 240 = 1440. The sum of the reciprocals of the factors is 1680540 = 289.

Type 13

Factorials, trailing zeros and the highest power of a prime

Factorial. n! = 1 × 2 × 3 × … × n, and 0! = 1. Keep the first few values ready: 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, 7! = 5040, 8! = 40320. Factorials grow so fast that a question like n + n! = some number is solved just by looking at this list.

Trailing zeros come from 10 = 2 × 5. Each pair of one 2 and one 5 in the prime factorisation gives one zero at the end. So

number of trailing zeros = the smaller of (power of 2, power of 5).

Formula: Trailing zeros = min(power of 2, power of 5)

[[fig:0]]

Multiply 25 × 48 × 35. Here 25 = 52, 48 = 24 × 3 and 35 = 5 × 7, so the power of 5 is 3 and the power of 2 is 4. That makes 3 pairs, and the product ends in 3 zeros (it is 42000).

A number ending in k zeros has a square ending in 2k zeros and a cube ending in 3k zeros, because every 2 and every 5 gets doubled or tripled.

Formula: k trailing zeros ⇒ square has 2k, cube has 3k

Highest power of a prime p in n! (Legendre's method). Count the multiples of p, then of p2, p3, …, and add:
power of p in n! = ⌊np⌋ + ⌊np2⌋ + ⌊np3⌋ + …
In practice, keep dividing n by p and add the quotients.

  • Zeros at the end of 100!: power of 5 = 20 + 4 = 24 (there are always more 2s than 5s), so 24 zeros.
  • Highest power of 3 in 30!: 10 + 3 + 1 = 14.

Formula: Power of prime p in n! = ⌊np⌋ + ⌊np2⌋ + ⌊np3⌋ + …
Zeros at the end of n! = power of 5 in n!

[[fig:1]]

Highest power of a composite number. Break it into primes and see which prime runs out first. For 12 = 22 × 3 in 30!, the power of 2 is 15 + 7 + 3 + 1 = 26, enough for 13 copies of 22, and the power of 3 is 14. The smaller one, 13, is the answer.

Highest power in a given product. Factorise each number and add the powers of the prime you want.

Which factorial ends in exactly k zeros? The count of zeros rises only when n reaches a multiple of 5, so n!, (n + 1)!, …, (n + 4)! have the same number of zeros when n is a multiple of 5. Start near n = 4k, find the zeros of that n, and move to the multiple of 5 that gives k. Since 100! has 24 zeros, 100!, 101!, …, 104! all end in exactly 24 zeros, and the smallest n is 100. At a multiple of 25 the count jumps by 2 (24! has 4 zeros but 25! has 6), so some numbers of zeros, such as 5, 11, 17 and 23, never occur at all.

Formula: Zeros of n! rise only at multiples of 5 (by 2 at multiples of 25), so the same count holds for n to n + 4; counts such as 5, 11, 17, 23 never occur

The last non-zero digit. To find the digit just before the trailing zeros, write n! = 2x × 5y × m, where m has no factor 2 or 5. There are always more 2s than 5s, so the last non-zero digit is the unit digit of 2x−y × m. For 10!: 10! = 28 × 34 × 52 × 7, so m = 34 × 7 = 567 and 28−2 = 64. The unit digits give 4 × 7 = 28, so the last non-zero digit is 8 (indeed 10! = 3628800).

Formula: n! = 2x 5y m (m free of 2 and 5) ⇒ last non-zero digit = unit digit of 2x−y × m

Type 14

Sum of series: natural numbers, odd and even numbers, squares, cubes, multiples

You never need to add a long list of numbers one by one. Almost every series in this chapter is either an equally spaced list (an AP) or can be paired into one.

Equally spaced numbers. For any list with a fixed gap:

  • Number of terms = last − firstgap + 1
  • Sum = number of terms × first + last2

Formula: Terms = last − firstd + 1; Sum = terms × first + last2
First n odd numbers = n2; first n even numbers = n(n + 1)
a2 − (a − 1)2 = a + (a − 1)

The reason is simple. Pair the first term with the last, the second with the second-last, and so on; every pair has the same sum.

[[fig:0]]

Standard results.

SeriesSum
1 + 2 + 3 + … + nn(n + 1)2
12 + 22 + … + n2n(n + 1)(2n + 1)6
13 + 23 + … + n3[n(n + 1)2]2
1 + 3 + 5 + … (first n odd numbers)n2
2 + 4 + 6 + … (first n even numbers)n(n + 1)

[[fig:1]]

Radhika adds 1 to 20 and gets 20 × 212 = 210. In the same way, the squares of 1 to 10 add to 10 × 11 × 216 = 385, the cubes of 1 to 10 add to 552 = 3025, and the odd numbers 1, 3, …, 39 (twenty of them) add to 202 = 400.

Formula: Σn = n(n + 1)2; Σn2 = n(n + 1)(2n + 1)6; Σn3 = [n(n + 1)2]2

Alternating series: pair them. In 1 − 2 + 3 − 4 + …, each pair (1 − 2), (3 − 4), … gives −1, so count the pairs.

Differences of squares: pair them too. a2 − b2 = (a + b)(a − b). When the numbers are consecutive, a − b = 1, so a2 − b2 = a + b. A long series like 402 − 392 + 382 − 372 + … + 22 − 12 then becomes 40 + 39 + 38 + … + 1 = 820.

Mixed patterns. If a series repeats a two-step pattern (like 1, 4, 5, 8, 9, 12, …), treat each pattern as one term; the groups form an equally spaced list.

Divisibility of a sum. n(n + 1)2 is a product, so its factors are easy to see. The sum of 1 to 20 is 10 × 21, which is divisible by 3, 5, 7, 10, 21, …

Type 15

Consecutive numbers: natural, even and odd

Consecutive natural numbers differ by 1 (7, 8, 9); consecutive even or odd numbers differ by 2 (14, 16, 18 or 15, 17, 19). The neatest way to name them is to put the middle number at the centre:

  • three consecutive numbers: n − 1, n, n + 1
  • three consecutive even (or odd) numbers: n − 2, n, n + 2
  • five consecutive even (or odd) numbers: n − 4, n − 2, n, n + 2, n + 4

Formula: Product of two consecutive odd/even: n(n + 2) = (n + 1)2 − 1

When the sum is given. With this naming the extra parts cancel, so middle number = sum ÷ number of terms (for an odd number of terms). If three consecutive even numbers add up to 96, the middle one is 32 and the numbers are 30, 32, 34.

Formula: Odd number of consecutive terms: middle = sumnumber of terms

[[fig:0]]

When the product is given. The numbers are close to each other, so they sit near the square root (for two numbers) or the cube root (for three). Suppose two consecutive odd numbers multiply to 399. √399 ≈ 20, so the numbers are 19 and 21 (19 × 21 = 399). If three consecutive odd numbers multiply to 4845, ∛4845 ≈ 16.9, so the middle odd number is 17, and 15 × 17 × 19 = 4845 ✓. Always confirm by multiplying. The unit digit (5 × 7 × 9 → 5) is a quick check as well.

When the difference of squares is given. For consecutive odd (or even) numbers n and n + 2:
(n + 2)2 − n2 = (n + 2 + n)(2) = 2 × (sum of the two numbers).
So the sum of the two numbers = difference of squares ÷ 2. If the squares of two consecutive even numbers differ by 60, the numbers add up to 30, so they are 14 and 16. Check that the numbers come out of the kind the question asks for, even or odd.

Formula: Two consecutive odd/even: (n + 2)2 − n2 = 2 × (sum of the two)

Squares of consecutive numbers. For five consecutive odd numbers with middle m, the sum of the squares is 5m2 + 2(22 + 42) = 5m2 + 40, so the average of the squares is m2 + 8.

Formula: Five consecutive odd/even with middle m: average of squares = m2 + 8

Type 16

Two-digit numbers and number puzzles

Two-digit numbers. If the tens digit is a and the units digit is b, the number is not a × b or a + b; it is 10a + b. The reversed number is 10b + a. Two results follow from these two lines:

  • Sum of a number and its reverse = 11(a + b)
  • Difference = 9(a − b)

So the number increases by 27 when the digits are reversed means 9(b − a) = 27, that is, b − a = 3. Combine it with the sum of the digits and the question is over.

Formula: Two-digit number = 10a + b; reverse = 10b + a
Number + reverse = 11(a + b); number − reverse = 9(a − b)

[[fig:0]]

The digits of Radhika's two-digit number add up to 11, and reversing the digits increases the number by 45. Then b − a = 5 and a + b = 11, so b = 8, a = 3, and the number is 38. Check: 83 − 38 = 45 ✓.

Three-digit numbers. 100a + 10b + c. Reversing gives 100c + 10b + a, and the difference is 99(a − c).

Formula: Three-digit: 100a + 10b + c; difference with reverse = 99(a − c)

Number puzzles in words. Turn each sentence into an equation, one unknown at a time:

  • A number's fifth part increased by 5 → x5 + 5.
  • If A gives one to B, they become equal → A − 1 = B + 1, so A − B = 2.
  • x is three times y → x = 3y.

Two numbers with sum S and difference D are S + D2 and S − D2.

Formula: Sum S, difference D ⇒ numbers S + D2, S − D2

The assumption method (heads and legs, coins, tickets). Assume everything is of the cheaper (or smaller) kind, find the shortage, and divide it by the difference per item. Suppose 30 animals, hens and goats, have 80 legs. If all were hens there would be 60 legs, a shortage of 20. Each goat adds 2 legs, so there are 10 goats and 20 hens.

[[fig:1]]

Testing options. In this type the options are usually small numbers. If the equation looks messy (a quadratic, or fractions), put the options in; the right one fits quickly.