A factor of a number is a number that divides it exactly: the factors of 12 are 1, 2, 3, 4, 6, 12. A prime number is one with exactly two factors — 1 and itself: 2, 3, 5, 7, 11, 13 … One solid fact: every number can be written as a product of primes in only one way (apart from the order). It is the number’s fingerprint, and the key to this whole chapter.
Once a number is written as N=23×32×5, three big families of exam questions can be read straight from that form:
Part
Typical question
Solved by
1. Factors
how many factors? their sum? how many pairs? perfect square?
multiply the (power + 1) of every prime
2. Trailing zeros
how many zeros at the end of n! or of a product?
counting pairs of 2 and 5
3. Recurring decimals
fraction ↔ decimal, sums, comparing, the n-th digit
the 2s, 5s and other primes of the denominator; denominators of 9s and 0s
How to studyAfter every method come solved examples and then questions to do yourself — open a solution only after you have tried. The divisibility tests (2, 3, 5, 7, 11) are in the chapter “Remainders and Divisibility”, and the basics of fractions in the chapter “Simple and Decimal Fractions”.
1
Part 1 — Factors
Count · sum · pairs · squares
From prime factorisation to the count, sum, product, odd/even and pairs of factors.
There are five methods, each resting on the one before. First learn to break a number into primes; everything else is its fruit.
Prime factorisation and the factor tree
N=paqbrc⋯
Breaking a number into primes, and counting the prime factors.
The idea
Take a number like 924. It is even, so 2 divides it: 924=2×462. 462 is even too: 462=2×231. The digit sum of 231 is 6, so 3 divides it: 231=3×77. And 77=7×11. Now every piece is prime, so stop. 924=2×2×3×7×11=22×3×7×11. This is the prime factorisation. Always divide by the smallest prime that works; that way no prime is ever missed.
◭ DiagramThe factor tree of 924: at every step the smallest prime (a coloured circle) drops out and the rest goes down; multiplying all the circles gives back 924∑ Formula
N=p1a1×p2a2×p3a3×⋯
The standard form (every p prime, every power ≥1)
N
the given number
p1,p2,…
the different primes, smallest first
a1,a2,…
the power of each prime (how many times it appears)
Which prime to try
It divides when
Why
2
last digit is even
multiples of 10 are divisible by 2
3
digit sum divisible by 3
10≡1 (mod 3)
5
last digit 0 or 5
multiples of 10 are divisible by 5
7
double the last digit, subtract from the rest; if 7 divides the result, it divides N
10a+b→a−2b
11
difference of alternate digit sums is 0 or a multiple of 11
10≡−1 (mod 11)
Here: a = the number left after cutting off the last digit, b = the last digit (in the row for 7); (mod k) means “the remainder on division by k”.
RememberWhere to stop? To break a number N, try only primes whose square does not exceed N. If no prime up to N divides it, N itself is prime. (Reason: of any two factors that multiply to N, one is always at most N.)
Counting the prime factors
“How many prime factors?” has two meanings. In 924=22×3×7×11 there are 4 different primes (2, 3, 7, 11), but if every prime is counted as many times as it appears, there are 2+1+1+1=5 prime factors. The exam usually means the second — the sum of the powers. When a base in the product is not prime (like 158), break it first: 158=38×58.
∑ Formula
Ω(N)=a1+a2+a3+⋯
prime factors counted with repeats: add all the powers; the bases must be prime
Ω(N)
number of prime factors of N (with repeats)
a1,a2,…
the powers of the primes in standard form
Steps
Divide by the smallest prime (2, then 3, 5, 7 …) as long as it divides; write down each quotient.
Stop when the quotient is 1 (or a prime is left).
Write a prime that repeats as a power.
Multiply back to check that you get the original number.
Example 1 · Basic
Write 756 as a product of primes.
Solution, step by step
1756 is even, so divide by 2: 756÷2=378; again 378÷2=189. 189 is odd, so 2 will not work any more.
2The digit sum of 189 is 1+8+9=18, so 3 divides it: 189÷3=63, 63÷3=21, 21÷3=7. 7 is prime, so stop.
3The divisors were 2, 2, 3, 3, 3 and finally 7, so 756=22×33×7.
4Check: 4×27×7=756 ✓
Answer22×33×7
At each stage check whether the quotient still divides by a small prime; that way no factor is ever missed.
Example 2 · Standard
How many prime factors does the product 46×93×352×11 have in all (each prime counted as many times as it appears), and how many different primes are there?
Solution, step by step
1The bases 4, 9 and 35 are not prime, so break them first: 46=(22)6=212; 93=(32)3=36; 352=(5×7)2=52×72.
2The whole product is 212×36×52×72×11.
3Total prime factors = sum of the powers =12+6+2+2+1=23.
4Different primes: 2, 3, 5, 7, 11 — that is 5.
Answer23 (in all), 5 (different)
Power rules: (am)n=amn and (ab)n=anbn.
Example 3 · Advanced
Is 1517 prime? If not, find its prime factors.
Solution, step by step
1382=1444<1517<392=1521, so 1517 is about 38.9. We need to try only primes up to 37: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37.
2The last digit is 7, so not 2 or 5; the digit sum 1+5+1+7=14, so not 3. 1517÷7: 7×216=1512, remainder 5 — no. 11: (7+5)−(1+1)=10 — no.
This is also the test for primality: if no prime up to N divides N, then N is prime.
BasicTry it yourself first
Write 1092 as a product of primes.
BasicTry it yourself first
How many prime factors (counting repeats) does 25×34×7 have?
StandardTry it yourself first
What is the sum of all the different prime factors of 3003?
StandardTry it yourself first
How many prime factors (counting repeats) does 65×103×152 have?
StandardTry it yourself first
If 2x×32×5=1440, what is the value of x?
AdvancedTry it yourself first
What is the largest prime factor of 8051?
AdvancedTry it yourself first
The product of two prime numbers is 2491. What is their sum?
The number of factors
(a+1)(b+1)(c+1)⋯
Adding 1 to every power and multiplying gives the count of all factors.
The idea
Look at 72=23×32. Any factor of 72 has the form 2i×3j, where the power i of 2 can be only one of 0,1,2,3 (4 choices) and the power j of 3 only one of 0,1,2 (3 choices). Every pair (i,j) gives a different factor, so there are 4×3=12 factors in all. The figure below is exactly this table: row = power of 2, column = power of 3, every cell one factor.
◭ DiagramThe 12 factors of 72: powers of 2 down the side (blue), powers of 3 across the top (green); total 4×3=12∑ Formula
d(N)=(a1+1)(a2+1)(a3+1)⋯
The total number of factors of N (1 and N included)
d(N)
number of factors of N
a1,a2,…
the powers of the primes in N=p1a1p2a2⋯
Why “+1”? Because a power may also be zero — the prime may be absent from that factor. For 23 the choices are 20,21,22,23: one more than the power. This also brings in 1 (all powers 0) and N (all powers full).
Form of N
Number of factors
Example
p (prime)
2
13: 1, 13
p2
3
49: 1, 7, 49
pk
k+1
26=64: 7
pq
4
15: 1, 3, 5, 15
p2q
6
12: 1, 2, 3, 4, 6, 12
Here p,q are different primes and k is any power. Two useful facts follow: a number with exactly 3 factors is always the square of a prime; a number with exactly 4 factors is either p3 or pq.
TrapTrap: “how many factors” includes both 1 and N. “Excluding 1 and N” means d−2; “less than N” means d−1. Read the wording carefully.
The reverse question: finding the number
Sometimes the number of factors is given and the number or a power is asked. Then split d into a product; each part = (power +1). For the smallest number, give the biggest power to the smallest prime (2), the next to 3, then 5. Try every way of splitting.
Split d=12
Powers
Number
12
11
211=2048
6×2
5, 1
25×3=96
4×3
3, 2
23×32=72
3×2×2
2, 1, 1
22×3×5=60 ← smallest
Steps
Break the number into primes: paqbrc.
Add 1 to every power: (a+1),(b+1),(c+1).
Multiply them all.
Look at the condition (count 1 and N or not) and subtract accordingly.
Example 4 · Basic
How many factors does 504 have?
Solution, step by step
1Break 504: 504÷2=252, ÷2=126, ÷2=63; 63=3×21=3×3×7. So 504=23×32×7.
2The powers are 3, 2, 1; adding 1 to each gives 4,3,2.
3Total factors =4×3×2=24.
Answer24
While counting, 1 and 504 itself are already inside this count.
Example 5 · Standard
N=2a×32×7 has exactly 36 factors. Find a and N.
Solution, step by step
1Number of factors =(a+1)(2+1)(1+1)=6(a+1).
26(a+1)=36⇒a+1=6⇒a=5.
3N=25×32×7=32×9×7=2016. Check: 6×3×2=36 ✓
Answera=5,N=2016
Running the same formula backwards gives the unknown power.
Example 6 · Advanced
Find the smallest number that has exactly 18 factors.
Solution, step by step
1Split 18 into parts: 18; 9×2; 6×3; 3×3×2. Each part is a power +1.
2The powers are {17}, {8,1}, {5,2}, {2,2,1}. Giving the biggest power to the smallest prime: 217=131072; 28×3=768; 25×32=288; 22×32×5=180.
3The smallest is 180; check: (2+1)(2+1)(1+1)=18 ✓
Answer180
Using more primes makes the powers smaller and the number often smaller — but check every split.
BasicTry it yourself first
How many factors does 24×32×5 have?
BasicTry it yourself first
The receipt number of a shop is 1001. How many factors does 1001 have?
BasicTry it yourself first
How many factors does 104 have?
StandardTry it yourself first
How many factors does 63×102 have in all?
StandardTry it yourself first
How many factors of 35×72 remain if 1 and the number itself are left out?
AdvancedTry it yourself first
What is the smallest number with exactly 10 factors?
AdvancedTry it yourself first
3a×5b has exactly 15 factors, and a>b≥1. Find the number.
Sum and product of factors
∏p−1pa+1−1 · Nd/2
The sum of all factors, their product and the sum of their reciprocals.
The idea: the sum
In the table of the last method each cell held a factor. Now we want to add them all. Take 100=22×52: the cells are 2i×5j. The sum of the whole table is exactly what you get by multiplying (1+2+4)×(1+5+25) — because every 2i pairs with every 5j exactly once, which is what expanding a product does. So σ(100)=7×31=217.
◭ DiagramThe 9 factors of 100 and their sum: the sum of the powers of 2 is 7, of the powers of 5 is 31, and the product is 217∑ Formula
σ(N)=∏p−1pa+1−1
The sum of all factors: one fraction for every prime, all multiplied (each fraction equals 1+p+p2+⋯+pa)
σ(N)
sum of all factors of N
p,a
a prime of N and its power
∏
multiply over all the primes
TrickInstead of memorising the formula, write the brackets directly: for 24 it is (1+2+4+8+16)=31; for 32 it is (1+3+9)=13. For small powers this is faster than the formula, and there is less room for error.
The product, and the sum of reciprocals
Tie the factors in pairs: f and fN always multiply to N. With d factors there are 2d pairs, each giving N, so the product of all factors is Nd/2. (When N is a perfect square the middle factor N stands alone, yet the same formula still holds.)
∑ Formula
∏f=Nd/2,∑f1=Nσ(N)
The product, and the sum of the reciprocals
∏f
product of all the factors
d
number of factors
σ(N)
sum of the factors
The sum of reciprocals is Nσ(N) because f1=NN/f and N/f is itself a factor; so ∑f1=N∑(N/f)=Nσ(N). The sum of the proper factors (leaving out N itself) is σ(N)−N. If this equals N, the number is a perfect number (6, 28, 496).
Steps
Write the prime factorisation.
For every prime evaluate the bracket (1+p+⋯+pa).
Multiply the brackets for σ(N); for the product find d and use Nd/2.
Example 7 · Basic
Find the sum of all the factors of 1400.
Solution, step by step
11400=14×100=2×7×22×52=23×52×7.
2Brackets: for 23, 1+2+4+8=15; for 52, 1+5+25=31; for 7, 1+7=8.
3Sum =15×31×8=3,720.
Answer3,720
The sum is much larger than the count — there are only d=4×3×2=24 factors, but their sum is 3,720.
Example 8 · Standard
Find the product of all the factors of 36 and of all the factors of 30.
Solution, step by step
136=22×32, so d=3×3=9. Product =369/2=(62)9/2=69.
269=1,00,77,696. (Check: in the factors 1, 2, 3, 4, 6, 9, 12, 18, 36, four pairs give 36 each and the middle 6 is left: 364×6=68×6=69 ✓)
330=2×3×5, so d=2×2×2=8 and the product =304=8,10,000.
Answer1,00,77,696 and 8,10,000
In a perfect square the middle factor N stands alone, yet Nd/2 still fits.
Example 9 · Advanced
(a) By comparing 496 with the sum of its proper factors, say whether 496 is a perfect number. (b) Find the sum of the reciprocals of all the factors of 60.
2Sum of proper factors =992−496=496, equal to the number — so 496 is a perfect number.
3(b) 60=22×3×5; σ(60)=7×4×6=168. Sum of reciprocals =Nσ=60168=514.
Answer(a) yes; (b) 514
The proper factors 1, 2, 3 of 6 add to 6; those of 28 (1, 2, 4, 7, 14) add to 28 — these are perfect numbers too.
BasicTry it yourself first
What is the sum of all the factors of 96?
BasicTry it yourself first
What is the sum of all the factors of 73×11?
StandardTry it yourself first
What is the sum of the proper factors of 220 (leaving out 220 itself)?
StandardTry it yourself first
What is the product of all the factors of 24?
StandardTry it yourself first
What is the sum of the reciprocals of all the factors of 12?
AdvancedTry it yourself first
The sum of all the factors of 5a is 781. What is a?
AdvancedTry it yourself first
The product of all the factors of a number N is N10. How many factors does N have?
Even, odd and special factors
Power of 2: from 1 to a, or only 0
Counting and summing even and odd factors, factors that are multiples of a given number, square and cube factors.
The idea
Every factor of N=2a×3b×7c looks like 2i3j7k. The factor is odd when 2 does not appear at all, i.e. i=0. It is even when at least one 2 appears, i.e. i∈{1,2,…,a}. The counting rule is the same as before; only the choices for 2 change:
Which factors
Count
Sum
all
(a+1)(b+1)(c+1)
(1+2+⋯+2a)(1+3+⋯)(1+7+⋯)
odd (i=0)
(b+1)(c+1)
drop the bracket of 2
even (i≥1)
a(b+1)(c+1)
(2+4+⋯+2a)(1+3+⋯)(1+7+⋯)
multiples of m (m∣N)
d(mN)
m×σ(mN)
perfect squares
(⌊2a⌋+1)(⌊2b⌋+1)⋯
keep only even powers
perfect cubes
(⌊3a⌋+1)(⌊3b⌋+1)⋯
keep only powers that are multiples of 3
Here: a,b,c = the powers of the primes 2, 3, 7; d(⋅) = number of factors; σ(⋅) = their sum; ⌊x⌋ = the whole-number part of x (drop the decimals).
The row for “multiples of m” is the most useful. A factor of N that is a multiple of m can be written m×(something), and that something must be a factor of mN. So N has exactly as many factors that are multiples of m as mN has factors. Taking m=2 gives the even factors: d(N/2) of them, with sum 2σ(N/2) — both agree with the rows above. Taking m=10 gives the “factors ending in zero”.
CheckEven + odd = all, for the count and for the sum. You can get one from the other by subtracting, and it doubles as your check.
Steps
Write the prime factorisation.
Decide which powers of which prime the question allows (even: power of 2 at least 1; odd: power of 2 equal to 0; multiple of m: take m’s powers off first; square: even powers).
For every prime write the number of choices (for a count) or the bracket-sum of those choices (for a sum).
Multiply them all.
Example 10 · Basic
How many odd factors and how many even factors does N=2352 have?
Solution, step by step
12352=16×147=24×147 and 147=3×49, so 2352=24×3×72.
2Odd factors contain no 2: the choices for the other primes are (1+1)(2+1)=2×3=6.
3Even factors have a power of 2 from 1,2,3,4 — 4 choices: 4×2×3=24.
4Check: total =5×2×3=30=6+24 ✓
Answer6 and 24
The choices of 2 decide the count: only 1 choice (power 0) for odd, a choices for even.
Example 11 · Standard
Find the sum of the odd factors and the sum of the even factors of 1960.
Solution, step by step
11960=8×245=23×5×72.
2Odd: leave out the bracket of 2: (1+5)(1+7+49)=6×57=342.
3Even: the bracket of 2 without the 1: (2+4+8)=14, so 14×6×57=4788.
4Check: total σ=15×6×57=5130 and 342+4788=5130 ✓
Answer342 and 4,788
Even factors are not just “doubled” odd ones: the bracket of 2 starts at 2 instead of 1.
Example 12 · Advanced
How many factors of 5400 are (a) multiples of 15, (b) perfect squares, (c) perfect cubes?
Solution, step by step
15400=23×33×52 (since 5400=54×100 and 54=2×27).
2(a) Factors that are multiples of 15 are as many as the factors of 155400=360=23×32×5: 4×3×2=24.
3(b) In a perfect square every power must be even: power of 2 from {0,2} (2 choices), of 3 from {0,2} (2 choices), of 5 from {0,2} (2 choices): 2×2×2=8.
4(c) In a perfect cube every power is a multiple of 3: power of 2 from {0,3} (2), of 3 from {0,3} (2), of 5 only {0} (1): 2×2×1=4.
Answer24, 8, 4
All three parts use one idea: which powers of which prime are allowed — count them and multiply.
BasicTry it yourself first
How many factors of 25×32×52 are odd?
BasicTry it yourself first
How many factors of 26×3×52 are even?
StandardTry it yourself first
What is the sum of all the odd factors of 24×32×7?
StandardTry it yourself first
How many factors of 4500 end in 0?
StandardTry it yourself first
How many factors of 26×34×53×7 are perfect squares?
AdvancedTry it yourself first
How many factors of 23×32×5×7 are multiples of 6 but not divisible by 5?
AdvancedTry it yourself first
How many factors of 23×52×7 have 5 as the last digit?
Perfect squares, pairs and ways of writing a product
d odd ⟺ perfect square
Pairs of factors, spotting a perfect square, ways of writing a number as a product of two factors, and making a perfect square or cube.
The idea
Every factor f of N has a partner fN, and the two multiply to N. For 30: 1×30, 2×15, 3×10, 5×6 — 8 factors, 4 pairs. But for 36: 1×36, 2×18, 3×12, 4×9 and 6×6. Here 6 is its own partner, so it is counted once and the total is 4×2+1=9 — an odd number.
◭ Diagram30: in all four pairs the partners are different, so the number of factors is even (8)◭ Diagram36: in the pair 6×6 the factor is its own partner (rose), so the number of factors is odd (9)∑ Formula
N=k2⟺d(N)odd
N is a perfect square ⟺ its number of factors is odd ⟺ every power in N is even
d(N)
number of factors of N
Reason: d=(a+1)(b+1)⋯ is odd only when every bracket is odd, i.e. every power is even — and when all powers are even the number is a square anyway. (The locker puzzle: 100 lockers are shut; student k flips every k-th locker, for k=1 to 100. Locker N is flipped once for each of its factors; it ends up open only if the number of factors is odd — that is lockers 1, 4, 9, …, 100.)
Questions about pairs
Question
Answer
When
ways of writing N=f×g (f≤g)
2d
N not a perfect square
2d+1
N a perfect square (f=g counted)
ways with two different factors
2d−1
N a perfect square
counting the order (f first, g second)
d
always
co-prime pairs (gcd(f,g)=1, f≤g)
2k−1
k different primes, N>1
Here: d = number of factors of N; k = number of different primes in N. In a co-prime pair the whole power of each prime goes either to f or to g (it cannot be split), so there are 2k ordered ways and 2k−1 unordered.
Making a perfect square or cube
For every prime whose power is not even, multiply by it once more (or divide by it once); for a cube make the power a multiple of 3. The smallest multiplier or divisor is the product of exactly the primes whose power is “incomplete”.
Power e
Multiply (square)
Divide (square)
Multiply (cube)
Divide (cube)
1
p
p
p2
p
2
—
—
p
p2
3
p
p
—
—
4
—
—
p2
p
5
p
p
p
p2
Here: e = the power of that prime p in the number; “—” means do nothing.
Steps
Find the prime factorisation and d.
Perfect square test: all powers even (or d odd).
For pair questions choose the right row of the table (square or not, order counted or not).
To make a square or cube, look at each prime’s power and build the multiplier or divisor.
Example 13 · Basic
Is 7056 a perfect square? In how many ways can it be written as a product of two factors (order not counted, equal factors allowed)?
Solution, step by step
17056=16×441=24×212=24×32×72.
2All the powers (4, 2, 2) are even, so it is a perfect square: 7056=842.
3The number of factors is d=(4+1)(2+1)(2+1)=45 (odd, as it should be).
4It is a perfect square, so the ways are 2d+1=246=23 (this includes 84×84).
Answera perfect square; 23 ways
Two ways to test: all powers even, or d odd. Both say the same thing.
Example 14 · Standard
By what smallest number must 1350 be multiplied to get (a) a perfect square, (b) a perfect cube?
Solution, step by step
11350=135×10=2×33×52.
2(a) For a square all powers must be even. The power 1 of 2 and the power 3 of 3 are odd; the power 2 of 5 is fine. Multiplier =2×3=6. Result 1350×6=8100=902 ✓
3(b) For a cube every power must be a multiple of 3. The power 1 of 2 needs 22 more; the power 3 of 3 is already fine; the power 2 of 5 needs one more 5. Multiplier =22×5=20. Result 1350×20=27000=303 ✓
Answer6 and 20
The smallest multiplier contains only the primes whose power is incomplete — the others are left alone.
Example 15 · Advanced
In how many ways can N=23×3×52×7 be written as a product of two co-prime factors (order not counted)? And when order is counted?
Solution, step by step
1There are four different primes: 2, 3, 5, 7, so k=4.
2For the factors to be co-prime the whole power of every prime must go into one factor: 23 into the first or the second, 3 into the first or the second, … — 2 choices for each.
3With order counted there are 24=16 ways. But (f,g) and (g,f) are the same pair, so without order 216=23=8.
Answer8 and 16
In a co-prime pair a prime’s power cannot be split — so each prime gives only 2 choices, not (a+1).
BasicTry it yourself first
In how many ways can 180 be written as a product of two factors (order not counted)?
BasicTry it yourself first
In how many ways can 2025 be written as a product of two different factors (order not counted)?
StandardTry it yourself first
By what smallest number must 2450 be multiplied to make a perfect square?
StandardTry it yourself first
By what smallest number must 2160 be divided to get a perfect square?
StandardTry it yourself first
By what smallest number must 1125 be multiplied to make a perfect cube?
AdvancedTry it yourself first
In how many ways can 2310 be written as a product of two co-prime factors (order not counted)?
AdvancedTry it yourself first
Which is the largest number below 100 that has exactly 3 factors?
AdvancedTry it yourself first
Which is the smallest perfect square divisible by each of 18, 20 and 30?
2
Part 2 — Trailing zeros
Pairs of 2 × 5 · n! · products
How many zeros end a product or n!, and the reverse question.
“With how many zeros does this product end?” is a sure exam question, and you never need to multiply it out. Four methods: the pairing idea, the formula for n!, the reverse question and different kinds of series.
Where zeros come from: a pair of 2 and 5
zeros =min(power of 2,power of 5)
Breaking a product into primes and counting the pairs of 2 and 5.
The idea
One zero at the end means the number is divisible by 10; two zeros mean 100, i.e. 102; k zeros mean 10k. But 10=2×5, so 10k=2k×5k. So the number must contain k twos and k fives, and a pair needs both. An example: 27×54×3=128×625×3=240000 — the four 5s found four 2s, so 4 zeros; the remaining three 2s and the 3 had no partner.
◭ Diagram27×54: four pairs (rose line) = four tens = 4 zeros; three 2s left without a partner∑ Formula
Z=min(x,y)
where 2x and 5y are the total powers of 2 and 5 in the prime factorisation of the product
Z
number of trailing zeros
x
total power of 2 in the product
y
total power of 5 in the product
Break every number of the product separately and add up the total powers. The reason adding works: 2a×2b=2a+b. There is no need to multiply out.
RememberTwo firm rules: (1) a product of odd numbers only never ends in 0, because it has not a single 2. (2) As soon as there is a multiple of 5 and an even number, zeros appear — but how many is told by the powers.
Steps
Break every number (or every power) of the product into primes; multiply the exponents by the outer power: (23⋅5)4=212⋅54.
Add the powers of 2 in all of them → x; add the powers of 5 → y.
Number of zeros =min(x,y).
Example 16 · Basic
How many zeros are at the end of the product 24×35×50×64×125?
Solution, step by step
1Break each number: 24=23×3; 35=5×7; 50=2×52; 64=26; 125=53.
2Total power of 2: x=3+1+6=10.
3Total power of 5: y=1+2+3=6.
4Zeros =min(10,6)=6. (Of the ten 2s only six find a 5 to pair with.)
Answer6
Always add both powers, then pick the smaller — here the power of 5 was smaller.
Breaking the bases into primes and multiplying by the outer power — that is the whole job.
Example 18 · Standard
How many zeros are at the end of 254×63×75?
Solution, step by step
1254=(52)4=58; 63=23×33; 75 has neither a 2 nor a 5.
2Power of 2: x=3; power of 5: y=8.
3This time the 2s run short: zeros =min(3,8)=3. (Five 5s are left without a partner.)
Answer3
Assuming “the 5s will always be fewer” is a trap. Here the 2s were fewer. Count both.
BasicTry it yourself first
How many zeros are at the end of 45×253?
BasicTry it yourself first
How many zeros are at the end of 125×32×7?
StandardTry it yourself first
How many zeros are at the end of 356×184×4?
StandardTry it yourself first
How many zeros are at the end of 15×25×35×45×55×8?
StandardTry it yourself first
How many zeros are at the end of 68×512?
StandardTry it yourself first
How many zeros are at the end of 1215×259?
AdvancedTry it yourself first
Find the smallest natural number n for which 14×15×16×n ends in exactly 3 zeros.
AdvancedTry it yourself first
How many zeros are at the end of 23×34×55×76×11?
Zeros of n! and Legendre’s formula
⌊5n⌋+⌊25n⌋+⋯
The highest power of a prime in n!=1×2×⋯×n, and from it the trailing zeros.
The idea
To count zeros in n! the earlier method still applies: count 2s and 5s. But here there is a convenience — the 2s always outnumber the 5s (every second number is even, but only every fifth is divisible by 5). So zeros = the total power of 5. Now count the 5s: every number from 1 to n divisible by 5 gives at least one 5 — there are ⌊5n⌋ such numbers. But 25, 50, 75, … contain two 5s (25=5×5); the first is already counted above, the second is still due — there are ⌊25n⌋ such numbers. Multiples of 125 hold a third 5, and so on.
◭ DiagramThe power of 5 in 130!: 26 numbers are divisible by 5, 5 of them hold a second 5 and 1 (the number 125) holds a third — 32 zeros in all∑ Formula
vp(n!)=k≥1∑⌊pkn⌋
The highest power of the prime p in n! (Legendre’s formula); keep adding until the quotient becomes 0
vp(n!)
the largest k such that pk divides n!
p
a prime (for zeros p=5)
⌊x⌋
the whole-number part of x (divide and drop the remainder)
CheckA check: write n in base p and add its digits (s); then vp(n!)=p−1n−s. For example 130 in base 5 is 10105 (125+5), digit sum 2, so 4130−2=32 ✓.
The highest power of a composite number
If asked for the largest k such that 12k divides n!, break 12=22×3. For 12k=22k×3k the number n! needs a power of 2 of at least 2k and a power of 3 of at least k. So k=min(⌊2v2⌋,v3) — divide each prime’s power by its exponent in the composite and take the smallest. This is also the question “how many zeros end n! when written in base 12?”.
Steps
Pick the prime p (for zeros, 5).
Divide n by p (whole-number part), then that quotient by p again, and so on until the quotient is less than p.
Add all the quotients.
For a composite do this for every prime, and take the minimum of power ÷ exponent.
Example 19 · Basic
How many zeros are at the end of 90!?
Solution, step by step
1Zeros = power of 5 (the 2s are in surplus).
2⌊90÷5⌋=18 (5, 10, …, 90 — each has at least one 5).
3⌊90÷25⌋=3 (25, 50, 75 — one extra 5 each). ⌊90÷125⌋=0, so stop here.
4Total =18+3=21 zeros.
Answer21
Add only until the quotient reaches 0; all later terms are 0.
Example 20 · Standard
What is the highest power of 7 in 300!, i.e. the largest k for which 7k divides 300!?
Solution, step by step
1Legendre’s formula for p=7: first ⌊300÷7⌋=42 (the multiples of 7).
2Now multiples of 72=49: ⌊300÷49⌋=6.
373=343>300, so the rest are 0.
4k=42+6=48.
Answer48
The formula works for every prime, not only 5.
Example 21 · Advanced
Find the largest k for which 12k divides 50! exactly.
Solution, step by step
112=22×3, so 12k=22k×3k.
2Power of 2 in 50!: 25+12+6+3+1=47.
3Power of 3 in 50!: 16+5+1=22.
4From the 2s: 2k≤47⇒k≤23; from the 3s: k≤22.
5Both conditions must hold: k=min(23,22)=22.
Answer22
Here the 3s set the limit, though the 2s alone could go up to 23 — always take the weakest link.
BasicTry it yourself first
How many zeros are at the end of 60!?
BasicTry it yourself first
How many zeros are at the end of 205!?
StandardTry it yourself first
What is the highest power of 3 in 100!?
StandardTry it yourself first
What is the highest power of 2 in 64!?
StandardTry it yourself first
Find the largest k for which 15k divides 80!.
AdvancedTry it yourself first
Find the largest k for which 20k divides 100!.
AdvancedTry it yourself first
How many zeros end 150! when it is written in base 12?
The reverse question: zeros given, find n
n≈4×zeros, then adjust
The smallest or largest n with given zeros, how many n are possible, and which zero-counts are impossible.
The idea
Now n is unknown and the count of zeros is known. Some things to understand. The zeros of n! grow with nlike a staircase: until n reaches the next multiple of 5 the zeros stay the same (before 25!, each of 20! to 24! has 4 zeros). Then at n=5,10,15,… one zero is added, but at n=25,50,75,100two are added and at n=125 three. So some zero-counts never occur at all.
◭ DiagramThe staircase of the zeros of n!: a jump of two at 25! (the count 5 never occurs) and again at 50! (the count 11 never occurs)
Fact
Why
For a zero-count k the possible n are either exactly 5 consecutive numbers (5m,5m+1,…,5m+4) or none
zeros rise only at multiples of 5
The smallest such n is always a multiple of 5
the step begins there
n lies roughly between 4k and 5k
the power of 5 in n! is a little under 4n
counts hidden by a jump: 25!→6, 50!→12, 75!→18, 100!→24
two zeros were added at each
Steps
Estimate from the zeros k: n≈4k, and take a multiple of 5 near it.
Find the zeros of that n with Legendre.
If the zeros are too few move n to the next multiple of 5; if too many, to the previous one. Repeat until exactly k.
The n where k first appears is the smallest, and 4 more than it is the largest.
Example 22 · Basic
Find the smallest n for which n! has at least 31 trailing zeros.
Solution, step by step
1Estimate: n≈4×31=124. Check: 124! has 24+4+0=28 zeros — fewer than 31.
2Zeros rise only at multiples of 5, so try the next multiple of 5, which is 125: 125! has 25+5+1=31 zeros.
3The previous multiple of 5 is 120: 120! has 24+4=28 zeros (fewer than 31). So the smallest n is 125.
Answer125
When n is not a multiple of 5 the zeros equal those of the previous multiple of 5 — so test multiples of 5 directly.
Example 23 · Standard
Is there any n for which n! ends with exactly 5 zeros? Explain. Also name the next three zero-counts after 5 that never occur.
Solution, step by step
124! has 4 zeros (⌊24÷5⌋=4, 24<25).
225! has 5+1=6 zeros, because 25 holds two 5s and so two zeros were added at once. From 4 straight to 6 — the 5 was skipped.
3So no n has exactly 5 zeros.
4The same happens at 50! (49!→10, 50!→12: 11 skipped), at 75! (74!→16, 75!→18: 17 skipped) and at 100! (99!→22, 100!→24: 23 skipped). The next three: 11, 17, 23.
AnswerNo; 11, 17, 23
The staircase figure shows exactly this: double jumps at 25, 50, 75, 100.
Example 24 · Advanced
n! ends with exactly 12 zeros. Find the smallest and the largest value of n and the number of possible values of n.
Solution, step by step
1Estimate 4×12=48. 49! has 9+1=10 zeros (too few); 50! has 10+2=12 — exactly 12 for the first time here.
2The smallest n is 50.
351!,52!,53!,54! also have ⌊n÷5⌋=10 and ⌊n÷25⌋=2, i.e. 12. At 55! it becomes 11+2=13.
4The largest n is 54 and the possible values are 50,51,52,53,54 — 5 in all.
Answer50, 54 and 5
For any possible zero-count there are exactly five consecutive values of n.
BasicTry it yourself first
Find the smallest n for which n! has at least 10 trailing zeros.
BasicTry it yourself first
If n! ends with exactly 7 zeros, what is the smallest value of n?
StandardTry it yourself first
n! ends with exactly 14 zeros. What is the largest possible value of n?
StandardTry it yourself first
Which of these can never be the number of trailing zeros of any n!?
AdvancedTry it yourself first
For how many natural numbers n does n! end with exactly 29 zeros?
AdvancedTry it yourself first
Find the smallest n for which n! is exactly divisible by 1050.
AdvancedTry it yourself first
Find the smallest n for which 710 divides n!.
Products of series
Term by term: powers of 5 and 2
Zeros in the product of a range of numbers, of multiples of a number, of odd numbers only, of terms with powers, and of factorials.
The idea
In the exam the product comes in many shapes, but the job is always the same: find the total power y of 5 and x of 2 in the whole product, then min(x,y). All the effort goes into counting x and y quickly. Each shape has a small trick:
Shape of the product
How to count the power of 5 (or 2)
a×(a+1)×⋯×b (consecutive)
subtract: v(b!)−v((a−1)!)
k×2k×3k×⋯×mk
=km×m!; add the powers of km and of m! separately
odd numbers only
power of 2 is 0, so 0 zeros; if a power of 2 is multiplied in, count the 5s and take min
terms with powers: 1e1×2e2×⋯
term je gives a power of 5 equal to e×v5(j); look only at the multiples of 5 and make a table
(n!)r or 1!×2!×⋯×n!
(n!)r: r×v(n!); for the product of factorials add each v(j!)
Here: v(⋅) = the power of that prime (5 or 2) in the term; v5(j) = the power of 5 in j (e.g. v5(50)=2); a,b = first and last number of a consecutive product; k,m = the multiple and the number of terms.
TrapThe weakest link: in n! it is always the 5s that run short, but in a product like k×2k×⋯ with many 5s inside k (such as k=15 or 25), the 5s are plentiful and the 2s may run short. Count both here.
Steps
Identify the shape (consecutive, multiples, odd, with powers, factorial).
With its trick get the total power y of 5.
Get the total power x of 2 (or argue that it is far larger than y).
The answer is min(x,y).
Example 25 · Basic
How many zeros are at the end of the product 61×62×63×⋯×140?
Solution, step by step
1This is the part of 140! left after 60!: 61×⋯×140=60!140!.
2Power of 5 in 140!: 28+5+1=34; in 60!: 12+2=14.
3On division the powers subtract: y=34−14=20.
4Power of 2: x=137−56=81, far above 20 (of 80 numbers, 40 are even), so the 2s will not run short.
5Zeros =min(81,20)=20.
Answer20
A product “from a to b” is always a quotient of two factorials.
Example 26 · Standard
How many zeros are at the end of the product 15×30×45×⋯×600 (the first 40 multiples of 15)?
Solution, step by step
1600=15×40, so the product =15×(15⋅2)×(15⋅3)×⋯×(15⋅40)=1540×40!.
2Power of 5: 1540=340×540 gives 40, and 40! gives 8+1=9; total y=49.
3Power of 2: 1540 has no 2; 40! gives 20+10+5+2+1=38; total x=38.
4This time the 2s are fewer: zeros =min(38,49)=38.
Answer38
First pull out the multiple to get km×m!; then it is easy to add the powers of 2 and 5 of the two parts separately.
Example 27 · Standard
How many zeros are at the end of 11×22×33×⋯×3030?
Solution, step by step
1The term jj gives a power of 5 equal to j×v5(j), so look only at the multiples of 5: 5, 10, 15, 20, 25, 30.
4Power of 2: from the even terms the total is x=416, far above y, so zeros =130.
Answer130
With powers on the terms, make a table of exponent × v5(j); do not forget two 5s at a term like 25.
Example 28 · Standard
How many zeros are at the end of 1×3×5×7×⋯×49×16 (all odd numbers up to 49, times 16)?
Solution, step by step
1The odd numbers carry no 2, so all the 2s come from 16: 16=24, x=4.
2The odd numbers with a 5: 5, 15, 25, 35, 45 — with powers of 5 equal to 1,1,2,1,1; total y=6.
3Zeros =min(4,6)=4. (Without the 16 the answer would be 0.)
Answer4
With odd numbers only the 2s can come from outside, so the answer is usually just the power of 2.
BasicTry it yourself first
How many zeros are at the end of 21×22×23×⋯×60?
BasicTry it yourself first
How many zeros are at the end of 25×50×75×⋯×400 (the first 16 multiples of 25)?
StandardTry it yourself first
How many zeros are at the end of 1×3×5×⋯×39×8 (all odd numbers up to 39, times 8)?
StandardTry it yourself first
How many zeros are at the end of (30!)3?
StandardTry it yourself first
How many zeros are at the end of 201×192×183×⋯×219×120?
AdvancedTry it yourself first
How many zeros are at the end of 1!×2!×3!×⋯×15!?
AdvancedTry it yourself first
How many zeros are at the end of 6×12×18×⋯×240 (the first 40 multiples of 6)?
AdvancedTry it yourself first
How many zeros are at the end of 51×52×53×⋯×100?
3
Part 3 — Recurring decimals
Fraction ↔ decimal · sums · comparing
When a fraction gives a terminating or a recurring decimal, recurring decimal to fraction, operations on them and comparing them.
A decimal can be of three kinds: terminating (it ends, like 0.375), pure recurring (it repeats from the very first digit, like 0.27) and mixed recurring (it repeats after a few digits, like 0.16). The bar on top marks the digits that repeat forever. Four methods: telling the kind, decimal to fraction, operations, and comparing/the n-th digit.
Fraction to decimal: when it ends, when it repeats
only 2s and 5s in the denominator ⟹ terminating
The remainder cycle of long division, the test for terminating, counting decimal places and the length of the repeating block.
The idea
Do 71 by long division. At every step we multiply the remainder by 10 and divide by 7; the remainders come as 1, 3, 2, 6, 4, 5 and then 1 returns. The moment a remainder repeats, all the work after it repeats too — and so do the digits: 71=0.142857. A remainder is always less than 7 (one of 1 to 6, six possibilities, or 0), so within a few steps either a repeat or an end is certain. If the remainder 0 appears, the division stops and the decimal is terminating.
◭ DiagramLong division of 71: the remainders (blue circles) go round a cycle and each gives one digit (rose); after six steps the 1 returns, so the repeating block has 6 digits
When does it end? Bring qp to lowest terms. The decimal stops when some 10k (that is 2k5k) is a multiple of the denominator q, so the fraction can be rewritten with denominator 10k. That happens only when q has no prime other than 2 and 5.
∑ Formula
q=2a5b⇒max(a,b)places
For the denominator of the fraction qp in lowest terms
a,b
the powers of 2 and 5 in q
max(a,b)
the larger of the two = number of places after the point
Reason: 407=23×57. To make the 5 appear three times multiply numerator and denominator by 52: 23×537×25=1000175=0.175 — three places, which is the bigger power 3.
The kind of recurring decimal and the length of the block
Now take q=2a×5b×m where m>1 has no 2 or 5. Then the decimal is recurring, and: before the repeat starts there are max(a,b) digits (if a=b=0, i.e. the denominator is only m, it is pure recurring); the length of the block is decided by m alone — it is the smallest k for which m divides 99…9 (k nines).
m
3
9
11
27
37
101
7
13
Block length
1
1
2
3
3
4
6
6
because it divides
9
9
99
999
999
9999
999999
999999
Here m = the part of the denominator that has no 2 or 5. (For example 31=0.3, 111=0.09, 371=0.027, 131=0.076923.) And a neat fact: rotating the digits of 71 gives the other sevenths — 72=0.285714, 73=0.428571, because the remainder cycle is the same, only the starting point differs.
TrapTrap: reduce the fraction first! The denominator of 11033 is 110=2×5×11, yet 11033=103=0.3 is terminating — the 11 cancelled.
Steps
Bring the fraction to lowest terms.
Break the denominator into primes: 2a×5b×m.
If m=1 it terminates, with max(a,b) places. Otherwise recurring: max(a,b) digits before the repeat, and block length from m.
If the digits are needed do the long division and stop when a remainder repeats.
Example 29 · Basic
Which of 8021,9017,11033,487,12513 give terminating decimals?
Solution, step by step
1First reduce and break the denominators into primes. 8021: gcd(21,80)=1, denominator 80=24×5 — only 2 and 5 ⟹ terminating.
29017: 17 is prime and does not cancel with 90; 90=2×32×5 contains 3 ⟹ recurring.
311033: gcd=11, lowest form 103 — denominator 2×5 ⟹ terminating.
4487: 48=24×3, a 3 is left ⟹ recurring. 12513: 125=53 ⟹ terminating.
Answer8021,11033,12513
Look at the denominator only after reducing.
Example 30 · Standard
Convert 135 to a decimal by long division and state the length of the repeating block.
Solution, step by step
113 has no 2 or 5, so the decimal will be pure recurring. Start with remainder 5: 50÷13=3 remainder 11 ⟹ digit 3.
4The remainder 5 has returned (remainders: 5, 11, 6, 8, 2, 7, then 5), so the repeat begins. 135=0.384615; block length 6.
Answer0.384615, block length 6
The moment a remainder repeats the digits repeat — the cycle is complete when we return to the first remainder.
Example 31 · Advanced
(a) Without dividing, say how many digits come before the repeat in 22013 and how long the block is; then write the decimal. (b) For how many integers n from 1 to 60 is 84n terminating?
Solution, step by step
1(a) 13 is prime, so the fraction is in lowest terms. 220=22×5×11: a=2, b=1, m=11.
2Before the repeat there are max(a,b)=2 digits; the block length comes from 11: 11∣99, so 2 digits.
3Long division gives 22013=0.0590 (the digits 0, 5 first, then 9, 0 repeat).
4(b) 84=22×3×7. 84n terminates only if n holds both the 3 and the 7 so that only 2s remain in the denominator, i.e. n is a multiple of 21.
5Multiples of 21 up to 60: 21, 42 — 2 in all.
Answer(a) 2 digits, block 2; (b) 2
In (a) the 11 of 220 decided the block, and the powers of 2 and 5 decided the “digits before”.
BasicTry it yourself first
Write 163 as a decimal.
BasicTry it yourself first
How many digits repeat in the decimal of 131?
StandardTry it yourself first
Which of these fractions gives a terminating decimal?
StandardTry it yourself first
How many digits will the decimal of 23×5613 have after the decimal point?
StandardTry it yourself first
Write 1259 as a decimal.
AdvancedTry it yourself first
For how many integers n from 1 to 100 is 70n a terminating decimal?
AdvancedTry it yourself first
Write 6017 as a decimal.
AdvancedTry it yourself first
Given 71=0.142857, what is the decimal of 75 without dividing?
Recurring decimal to fraction
digits ÷ (nines for the block, then zeros)
Turning pure and mixed recurring decimals into fractions, and why the method works.
The idea: shift and subtract
Take x=0.47=0.474747… The block has 2 digits, so multiply x by 100: 100x=47.4747… The digits after the point in the two lines are identical, so they cancel on subtraction: 100x−x=47, i.e. 99x=47 and x=9947. An endless repeat leaves nothing behind — that is the heart of the method.
◭ DiagramThe tails of x and 100x are the same; subtracting gives 99x=47∑ Formula
0.a=r9…9a
Pure recurring: the number made by the block of digits ÷ as many 9s
a
the digits of the block (read as one number, like 47)
r
number of digits in the block
∑ Formula
0.pa=r9…9k0…0pa−p
Mixed recurring: (all the digits) − (the digits before the repeat); in the denominator r nines followed by k zeros
p
the k digits before the repeat (as one number)
a
the r digits of the block (as one number)
pa
the digits of p followed by the digits of a: one number
The reason for the mixed case is the same shifting. Let y=0.16=0.1666…: 10y=1.666… and 100y=16.666… The tails of these two are the same, so subtract: 90y=16−1=15, y=9015=61. Here the “nine” in the denominator is for the one digit of the block and the “zero” for the one digit before the repeat. Keep the whole-number part aside and add it at the end: 3.27=3+9027−2=3+185=1859.
◭ Diagram0.3,0.33,0.333,0.3333 get closer to 31 each time; infinitely many 3s are exactly 31
RememberSurprising but true:0.9=99=1. In the same way 0.49=9049−4=9045=0.5. If the decimal ends in endless 9s, it is just the next “round” number.
Steps
Keep the whole-number part aside.
Count the digits before the repeat (k) and the digits of the block (r).
Numerator = (all digits up to the end of the first block, read as a number) − (the digits before the repeat); denominator = r nines followed by k zeros.
Simplify the fraction and add the whole part.
Example 32 · Basic
Convert 0.135 into a fraction in lowest terms.
Solution, step by step
1The block has 3 digits (135) and nothing before it, so the denominator has three 9s: 999.
20.135=999135.
3Both divide by 27 (135=27×5, 999=27×37).
4Lowest terms: 375.
Answer375
First see whether there are digits before the repeat — none here, so only nines.
Example 33 · Standard
Convert 0.218 into a fraction in lowest terms.
Solution, step by step
1One digit before the repeat (2), a block of 2 digits (18). So the denominator: two 9s and one 0 ⟹ 990.
2Numerator: all digits (218) − the digits before the repeat (2) =216.
3990216; both divide by 18 (216=18×12, 990=18×55).
4Lowest terms: 5512. Check: 12÷55=0.21818… ✓
Answer5512
The nines in the denominator are for the block, the zeros for the digits before the repeat.
Example 34 · Standard
Write 4.036 as an improper fraction qp.
Solution, step by step
1Keep the whole part 4 aside; what remains is 0.036 — one digit before the repeat (0) and a block of 2 digits (36).
2Numerator: all digits (036) − the digit before (0) =36; denominator: two 9s, one 0 ⟹ 990.
399036=552 (both divide by 18).
44+552=55220+2=55222.
Answer55222
A “0” before the repeat still counts: the denominator gets a zero.
Example 35 · Advanced
Show that 0.39=0.4 and 2.9=3, and explain what “the difference is exactly zero” means.
Solution, step by step
10.39: one digit before the repeat (3), a block of one digit (9). Numerator =39−3=36, denominator =90.
29036=52=0.4.
32.9=2+99=2+1=3.
40.4−0.3999…=0.0000…: there is no place anywhere where a difference could show (every place is 0), so they are one and the same number. Between two different numbers there is always another number; here there is none — which proves they are equal.
Answer0.39=52=0.4 and 2.9=3
A decimal ending in endless 9s can always be rewritten as a terminating decimal.
BasicTry it yourself first
Convert 0.8 into a fraction.
BasicTry it yourself first
Convert 0.27 into a fraction in lowest terms.
StandardTry it yourself first
Convert 0.405 into a fraction in lowest terms.
StandardTry it yourself first
Convert 0.16 into a fraction in lowest terms.
StandardTry it yourself first
Write 2.18 as an improper fraction.
AdvancedTry it yourself first
Convert 0.12345 into a fraction in lowest terms.
AdvancedTry it yourself first
If 0.ab=338 (where ab is a two-digit number), what is ab?
AdvancedTry it yourself first
What is the value of 0.49?
Sums, differences, products, quotients and roots of recurring decimals
Make fractions, or add the blocks
Two ways: turn everything into fractions, and for sums stretch the blocks to equal length and add them; plus a few quick patterns.
The idea
Recurring decimals are really fractions, so the safest way is: turn every decimal into a fraction, do the operation, and turn back into a decimal if asked. This works for every operation (+, −, ×, ÷, square root). For sums and differences there is also a quick way, learned below.
The quick way: add the blocks
Let P be the largest number of digits that come before the repeat in any of the decimals, and L the LCM of all the block lengths. Cut every decimal in two: the first P digits (the finite part) and the repeating block after it, stretched to L digits (stretch the block 7 to two digits and it becomes 77). Adding all the finite parts is an ordinary decimal sum, and adding all the stretched blocks as numbers gives S. The blocks together are worth 99…9S (L nines). If S reaches the number made of all those nines, the whole-number part of the quotient is added at the P-th place and the remainder becomes the new block.
∑ Formula
S=q(10L−1)+r
Divide S by 99…9 (L nines): quotient q and remainder r
S
the sum of the stretched blocks (as numbers)
L
the LCM of the block lengths
q
whole units: add them at the P-th decimal place
r
the remainder: this is the new block (written with L digits, zeros in front)
◭ DiagramAdding three decimals (the first example below): the finite parts (blue) add as usual, the blocks (saffron) add as numbers to give S=195; 195=99×1+96
Quick patterns (useful every time):0.a+0.b=9a+b; 0.ab+0.ba=9911(a+b)=9a+b (swapping the digits a,b does not change the sum); 0.a×9=a; 0.ab×99=ab. And when a+b≥9 the value 9a+b reaches 1 or more, such as 910=1.1.
CheckTry both ways: if the answers differ there is a mistake somewhere. In a multiple-choice question whose options are decimals the block method is quicker; for multiplication and division make fractions.
Steps (block method for sums)
In each decimal note the digits before the repeat and the block; find P (most digits before) and L (LCM of block lengths).
Write every decimal as its first P digits (finite part) followed by a block of L digits.
Add the whole parts and the finite parts; add the L-digit blocks as numbers to get S.
See how many times 10L−1 goes into S (q) and add it at the P-th place; the remainder is the new block. (If the remainder is 0 the answer terminates.)
Example 36 · Standard
Find 1.236+0.7+2.045 as a recurring decimal.
Solution, step by step
1Digits before the repeat: 1, 0, 2 ⟹ P=2. Block lengths 2, 1, 1 ⟹ L=LCM=2.
2Write each decimal as “P digits | block of L digits”: 1.23∣63; 0.77∣77; 2.04∣55 (the block 7 stretched to 77, 5 to 55).
3Finite parts: 1.23+0.77+2.04=4.04. Blocks as numbers: S=63+77+55=195.
499 goes into S=195 once (q=1), with remainder 195−99=96. Add q=1 at the second decimal place: 4.04+0.01=4.05.
5Answer: 4.0596. Check (with fractions): the sum =330013397=4.0596 ✓
Answer4.0596
The “overflow” q of the blocks is added to the finite part afterwards — this is where mistakes usually happen.
Example 37 · Basic
Find the value of 0.37+0.73.
Solution, step by step
1Both blocks have 2 digits and nothing comes before them ⟹ P=0, L=2.
2Add the blocks: S=37+73=110.
399 goes in once (q=1) with remainder 110−99=11. This q=1 is added at the whole-number place (P=0, i.e. before the point).
4Sum =1.11=1.1. With fractions: 9937+9973=99110=910=1.1 ✓ (pattern: 9a+b=93+7).
Answer1.1
When the block sum is ≥ 99 the whole-number part of the answer rises.
Example 38 · Standard
Find (a) 0.12×0.33 and (b) 0.7÷0.14.
Solution, step by step
1For multiplication and division making fractions is the right way. 0.12=9912=334 and 0.33=9933=31.
2(a) 334×31=994=0.04 (because 994=9904).
3(b) 0.7=97 and 0.14=9914. Dividing means multiplying by the reciprocal: 97×1499.
4Simplify: 97×1499=11×211=211=5.5.
Answer(a) 0.04; (b) 5.5
The block trick does not work for multiplication and division — make fractions.
BasicTry it yourself first
What is the value of 0.5+0.7?
BasicTry it yourself first
What is the value of 0.58+0.85?
StandardTry it yourself first
What is the value of 5.27−2.54?
StandardTry it yourself first
What is the value of 0.18×0.55?
StandardTry it yourself first
Find the cube root of 0.296.
StandardTry it yourself first
If x+0.36=1.81, what is the value of x?
AdvancedTry it yourself first
Find the value of 2.3+1.14+0.27.
AdvancedTry it yourself first
What is the value of 0.4×0.3?
Comparing, ordering and the n-th digit
the first difference decides · nmodr
Comparing recurring decimals, the digit at the n-th place and the sum of the first n digits.
Comparing
Comparing two decimals is just like ordering words in a dictionary: first the whole part, then go place by place from the first decimal place and find the first place where the digits differ — that settles it. But for recurring decimals the digits have to be written out, so write both out to enough places for the difference to show. Example: 0.63=0.636363… and 0.636=0.636666…: the first three digits agree and the fourth is 3 against 6 — so 0.636 is bigger.
◭ DiagramThe digits of A=0.63 and B=0.636 side by side: the first difference (rose) is at the fourth place — 3 against 6 there, so B is bigger
TrickA direct rule: a recurring decimal (like 0.3) is always bigger than its chopped finite form (0.33, 0.333), because more is still to be added after the cut. To compare with a fraction, write the fraction as a decimal and look at a few digits, or bring both to a common denominator.
The n-th digit and the sum of digits
Say the decimal has k digits before the repeat and a block of r digits. If n≤k the n-th digit comes straight from the first digits. Otherwise look into the block: drop the digits before the repeat (leaving n−k), divide (n−k) by r and take the remainder. If the remainder s=0 it is the s-th digit of the block; if the remainder is 0 it is the last (r-th) digit of the block.
∑ Formula
dn=block[(n−k)modr]
for n>k; if the remainder is 0, the last (r-th) digit of the block
n
place after the decimal point
k
number of digits before the repeat
r
number of digits in the block
The sum of the first n digits: the sum of the first k digits + (number of complete blocks × the digit-sum of one block) + (the sum of the leftover digits, which are the opening digits of the block). The number of complete blocks is ⌊rn−k⌋.
Steps
Write the decimal and identify k (before the repeat) and r (the block).
For comparing: write both digit strings side by side and find the first different digit.
For the n-th digit: (n−k)modr; for the sum: count the complete blocks and the leftover digits separately.
Example 39 · Standard
Arrange 0.63,0.63,0.6,0.636 in descending order.
Solution, step by step
1Write the first 6 decimal digits of all four: 0.636363, 0.633333, 0.666666, 0.636666.
2The first digit is 6 in all. The second digit: 3, 3, 6, 3 — so 0.6 (second digit 6) is the biggest.
3Among the other three the third digit: 0.63→6, 0.63→3, 0.636→6 — 0.63 is the smallest.
4Between 0.63 and 0.636 the fourth digit: 3 against 6 — 0.636 is bigger.
5Descending order: 0.6>0.636>0.63>0.63.
Answer0.6>0.636>0.63>0.63
In a digit-by-digit comparison the first differing digit decides everything; later digits are never looked at.
Example 40 · Basic
For 135=0.384615 find (a) the 100th digit after the point and (b) the sum of the first 50 digits.
Solution, step by step
1No digit before the repeat (k=0) and the block 384615 has r=6 digits.
2(a) 100÷6=16 remainder 4. The remainder is 4, so the 100th digit is the fourth digit of the block: 3,8,4,6,1,5 ⟹ 6.
3(b) The digit-sum of one block is 3+8+4+6+1+5=27.
450÷6=8 remainder 2: 8 complete blocks and 2 leftover digits (3 and 8). Sum =8×27+(3+8)=216+11=227.
Answer(a) 6; (b) 227
If the remainder is 0 take the last digit of the block, not the first.
Example 41 · Advanced
For 6017=0.283 find (a) the 75th digit and (b) the sum of the first 40 digits.
Solution, step by step
1Two digits before the repeat (2, 8): k=2; the block is a single digit (3): r=1.
2(a) 75>2, so in the block: (75−2)mod1=0 — remainder 0 means the last digit of the block, which is 3. The 75th digit is 3.
3(b) The first 2 digits add to 2+8=10. The remaining 40−2=38 places are all 3: 38×3=114.
4Sum =10+114=124.
Answer(a) 3; (b) 124
In a mixed recurring decimal count the first k digits separately, then do the block arithmetic.
BasicTry it yourself first
Which is the largest of 0.5,0.54,0.54,0.54?
BasicTry it yourself first
Which is the smallest of 0.27,0.27,0.27,0.2?
StandardTry it yourself first
What is the 50th digit of 72=0.285714?
StandardTry it yourself first
What is the sum of the first 30 digits of 71=0.142857?
StandardTry it yourself first
What is the 41st digit of the decimal of 121?
AdvancedTry it yourself first
How many times does the digit 8 appear among the first 75 digits of 373=0.081?
AdvancedTry it yourself first
Arrange 74,0.57,0.57 in ascending order.
AdvancedTry it yourself first
What is the sum of the first 100 digits of 131=0.076923?
4
Summary, mixed practice, revision
All methods in one place
One table of all methods, exam-style mixed questions and revision cards.
Summary of all methods
Which method when
One page to pick the method as soon as you read a question.
Method
Use when
Key formula / move
Prime factorisation
the first move of any factor question
divide by the smallest prime; try up to N; sum of powers = prime factors
Number of factors
“how many factors”
(a+1)(b+1)(c+1)⋯
Sum, product, sum of reciprocals
“of all the factors”
∏p−1pa+1−1; Nd/2; Nσ
Even, odd, multiples, square factors
any condition on the factors
count the allowed powers of each prime; multiples of m: d(N/m)
Perfect squares and pairs
“in how many ways as a product”, “make a square/cube”
2d, 2d+1, 2k−1; complete the incomplete powers
Zeros: pairs of 2 and 5
zeros at the end of a product
min(x,y)
n! and Legendre
power of a prime or a composite in n!
⌊pn⌋+⌊p2n⌋+⋯
Reverse question
zeros given, n asked
n≈4k, test multiples of 5; 5, 11, 17, 23 never occur
Series products
consecutive, multiples, odd, with powers, factorials
(a−1)!b!; kmm!; count both 2s and 5s
Terminating or recurring
the decimal form of a fraction
only 2, 5 in the denominator ⟹ terminating (max(a,b) places)
Decimal → fraction
a recurring decimal is given
(all digits − digits before) ÷ (r nines, k zeros)
Operations on recurring decimals
sums, products, roots
make fractions; for sums stretch blocks to L and add
Comparing and the n-th digit
order, “the n-th digit”, sum of digits
first differing digit; (n−k)modr
Letters in the table:N = the given number; a,b,c = powers of primes; d = number of factors; σ = their sum; k = number of different primes (in pairs) or the digits before the repeat (in decimals); x,y = total powers of 2 and 5; n = the n of n!, p = a prime; r = digits in the block; L = LCM of the block lengths; m = a factor whose multiples are to be counted.
Spot itAs soon as you read a question ask: (1) is it factors, zeros or decimals? (2) for factors — write the prime factorisation. (3) for zeros — the powers of 2 and 5. (4) for decimals — which prime other than 2, 5 is in the denominator?
Mixed practice — set 1
Basic to standard
Mixed questions from all three parts; spot the method first, then solve.
These questions are not in method order — just like the exam. For each, first decide which method fits.
BasicTry it yourself first
How many factors does 1584 have?
BasicTry it yourself first
What is the sum of all the factors of 22×3×7?
BasicTry it yourself first
Which of 1296, 1350, 1458, 1500 has an odd number of factors?
BasicTry it yourself first
How many zeros are at the end of 40×125×18×7?
BasicTry it yourself first
How many zeros are at the end of 85!?
BasicTry it yourself first
What is the highest power of 5 in 400!?
BasicTry it yourself first
What is the simplest fraction for 0.36?
BasicTry it yourself first
What is the simplest fraction for 0.23?
StandardTry it yourself first
Which of these fractions is a terminating decimal?
StandardTry it yourself first
What is the value of 0.2+0.9?
StandardTry it yourself first
Which is the largest of 0.12,0.12,0.121?
StandardTry it yourself first
What is the 40th digit of 73=0.428571?
StandardTry it yourself first
How many prime factors (counting repeats) does 84×93×102 have?
StandardTry it yourself first
How many factors of 23×52×11 are even?
StandardTry it yourself first
In how many ways can 1764 be written as a product of two factors (order not counted, equal factors allowed)?
StandardTry it yourself first
Find the smallest n for which n! has at least 8 trailing zeros.
Mixed practice — set 2
Standard to advanced
Mixed questions from the hard end of the exam.
Several questions here need two methods together. Do not look for a method name; decide from how the question looks.
StandardTry it yourself first
What is the smallest number with exactly 14 factors?
StandardTry it yourself first
What is the sum of all the odd factors of 25×33×52×7?
StandardTry it yourself first
How many factors of 64×152 are perfect cubes?
AdvancedTry it yourself first
In how many ways can 30030 be written as a product of two co-prime factors (order not counted)?
AdvancedTry it yourself first
By what smallest number must 2058 be multiplied to make a perfect cube?
StandardTry it yourself first
How many zeros are at the end of 31×32×33×⋯×150?
StandardTry it yourself first
How many zeros are at the end of 25!×40!?
AdvancedTry it yourself first
Find the largest k for which 18k divides 100!.
AdvancedTry it yourself first
How many zeros are at the end of 35×70×105×⋯×700 (the first 20 multiples of 35)?
StandardTry it yourself first
What is the value of 0.81+0.18?
StandardTry it yourself first
Write 2.45 as an improper fraction.
StandardTry it yourself first
Convert 0.318 into a fraction in lowest terms.
AdvancedTry it yourself first
Find 1.6+0.45+2.03 as a recurring decimal.
AdvancedTry it yourself first
What is the 87th digit of 137=0.538461?
AdvancedTry it yourself first
For how many integers n from 1 to 200 is 150n a terminating decimal?
AdvancedTry it yourself first
What is the sum of the first 61 digits of 71=0.142857?
Revision — cards and traps
Flip and recall
Read the front, think, then flip.
TrapsMost common traps: (1) not adding 1 to the powers when counting factors. (2) misjudging 0.9=1. (3) forgetting the two 5s of numbers like 25 in n!. (4) deciding terminating/recurring without first reducing. (5) in a product of a series, counting only the 5s and forgetting to look at the 2s.
Your pass
How is it going?
A short honest review helps other students decide. Good or bad, we publish it.