Revision Aid: Zeta Club Factsheet - Number Theory

advertisement
Junior/Intermediate Number Theory Tips
(Last updated 27th July 2013)
Key Terms:






Coprime/Relatively Prime: When two numbers don’t share any common factors, i.e. their
Greatest Common Divisor is 1.
Integer: A whole number.
Positive Integer: Does not include 0. i.e. 1 or more.
Prime: Note that 1 is NOT prime!
Fundamental Law of Arithmetic: Every integer can be expressed as a product of prime
factors in one way only. E.g. 12 can only be expressed as a product of primes as 22 × 3.
𝑎|𝑏 means that 𝑎 divides 𝑏. e.g. 2|8.
Divisibility Rules:
Divisible By:
2
3
4
5
6
7
8
9
10
11
12
Properties
Last digit even
Digits add up to multiple of 3
Last two digits a multiple of 4
Last digit 0 or 5
Divisible by 2 and 3 (so has properties of each)
We could subtract twice the units digit from the remaining digits and keep
applying. If the result is a multiple of 7 the original number is a multiple of 7:
e.g. 11529 → 1152 − 18 = 1134 → 113 − 8 = 105 → 10 − 10 = 0
0 is a multiple of 7 so 11529 is.
However, since we need to apply as many steps as there are digits, the trick is
only really useful to mentally verify that 3 or 4 digit numbers are divisible by 7
(i.e. useful for the JMC/IMC, but not so useful elsewhere).
Last three digits multiple of 8
Digits add up to multiple of 9
Last digit 0
Add up every other digit and subtract remaining digits. Result is a multiple of 11.
e.g. 7192427 → (7 + 9 + 4 + 7) − (1 + 2 + 2) = 22
Divisible by 3 and 4 (so has properties of each).
For divisibility by a larger number, we have the divisibility properties of all this number’s factors. E.g.
If divisible by 24, then it must also be divisible by 3 and 8, so the digits add up to a multiple of 3, and
the last three digits must be divisible by 8.
Oddness/Evenness


𝑜𝑑𝑑 + 𝑜𝑑𝑑 = 𝑒𝑣𝑒𝑛,
𝑒𝑣𝑒𝑛 + 𝑒𝑣𝑒𝑛 = 𝑒𝑣𝑒𝑛, 𝑜𝑑𝑑 + 𝑒𝑣𝑒𝑛 = 𝑜𝑑𝑑
𝑜𝑑𝑑 × 𝑜𝑑𝑑 = 𝑜𝑑𝑑 (and thus an odd number to any positive integer power is odd)
𝑜𝑑𝑑 × 𝑒𝑣𝑒𝑛 = 𝑒𝑣𝑒𝑛
Spotting when expressions/numbers are odd are even has a variety of uses:
o
o
o
We might want to show we have a contradiction in an equation, if we say show the
LHS is even and the RHS is odd.
It helps us constraint variables. E.g. If 4𝑥 + 5𝑦 = 2000, then because the RHS is
even, 4𝑥 is even when 𝑥 > 0 and 5𝑦 is always odd, then 4𝑥 would have to be odd
and thus 𝑥 = 0.
If we knew a variable 𝑛 was odd, we could replace it with 2𝑘 + 1 for some integer 𝑘
and hopefully constrain values of variables further or prove some assertion.
Using Algebra




If the digits of a 3-digit number are “𝑎𝑏𝑐”, then the value of the number is 100𝑎 + 10𝑏 + 𝑐.
This might allow us to do further manipulation.
Note also that 1 ≤ 𝑎 ≤ 9 and 0 ≤ 𝑏 ≤ 9 and 0 ≤ 𝑐 ≤ 9. In some questions we might have
to ‘try out’ possible values for the digits to see if they work for a particular problem. But
we’ll often find we only have limited possibilities that need testing.
An even number can be represented as 2𝑘 where 𝑘 is any integer. Similarly an odd number
can be represented as 2𝑘 + 1. Similarly, we could represent a square number using 𝑘 2.
For questions where you’re asked to find integer values for variables so that some
expression is also an integer, just create a new integer variable.
e.g. “Find the form of all integers 𝑛 such that √2𝑛 + 1 is also an integer”, then a good start
would be to say √2𝑛 + 1 = 𝑘 for some integer 𝑘, and then 2𝑛 + 1 = 𝑘 2 . Now we have a
Diophantine Equation (see below).
Using our ‘oddness/evenness’ tip above, we can see the LHS is odd, so the RHS must be odd.
If 𝑘 2 is odd, since 𝑜𝑑𝑑 × 𝑜𝑑𝑑 = 𝑜𝑑𝑑, then 𝑘 must be odd. So we could replace it with 2𝑚 +
1 where 𝑚 is an integer. This gives 2𝑛 + 1 = (2𝑚 + 1)2 = 4𝑚2 + 4𝑚 + 1, thus 𝑛 =
2𝑚(𝑚 + 1). Thus 𝑛 is twice the product of any two consecutive numbers.
Remainders and Modular Arithmetic




If 𝑥 divided by 𝑦 gives a remainder of 𝑧, then 𝑥 − 𝑧 must be divisible by 𝑦.
e.g. If 44 divided by 10 gives a remainder of 4, then clearly 44 − 4 = 40 is divisible by 10.
If 17 and 7 give the same remainder when divided by 5, we can write 17 ≡ 7 ≡ 2 (𝑚𝑜𝑑 5).
The ≡ symbol means ‘congruent to’. It means that 7 is equivalent to 2 is ‘modulo-5
arithmetic’. In modular arithmetic, numbers have the same value if their remainders are the
same. So far example, the bearings 10° and 370° are equivalent (in modulo-360 arithmetic),
and we can say that 10 ≡ 370 (𝑚𝑜𝑑 360).
You don’t need to know modular arithmetic for JMO/IMO, it’ll become more useful in the
Senior version. However, it can be incredibly useful for number theory problems.
Laws of modular arithmetic:
o If 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑐), then 𝑘𝑎 ≡ 𝑘𝑏 (𝑚𝑜𝑑 𝑐). e.g. We know that 6 and 11 have the
same remainder when divided by 5, i.e. 6 ≡ 11 (𝑚𝑜𝑑 5). We could scale by 3 for
example, so 18 and 33 must have the same remainder when divided by 5.
o If 𝑎 = 𝑏 (𝑚𝑜𝑑 𝑐) then 𝑎𝑘 = 𝑏 𝑘 (𝑚𝑜𝑑 𝑐).
Suppose we wanted to know the last digit of 7100. Then working in modulo-10
arithmetic would give us the units digit (i.e. finding the remainder when we divide by
10). Now 72 ≡ 9 (𝑚𝑜𝑑 10) because 49 gives a remainder of 9 when divided by 10.
Also, 73 ≡ 3 (𝑚𝑜𝑑 10) and 74 ≡ 1 (𝑚𝑜𝑑 10 ).
At this point, we could use the above law. (74 )𝑘 ≡ 1𝑘 ≡ 1 (𝑚𝑜𝑑 10),
so 74𝑘 ≡ 1 (𝑚𝑜𝑑 10). We’ve found the 7 to the power of any multiple of 4 gives a
remainder of 1 when divided by 10. Since 100 is a multiple of 4, the units digit of
7100 is 1. This trick is useful whenever we have a remainder of 1, because 1 to any
power is still 1.
Using Prime Factorisations
Finding the prime factorisation of a number often helps:



A number is square of all the powers/indices in the prime factorisation are even. e.g. 24 ×
36 is a square number, because (22 × 33 )2 = 22 × 33 × 22 × 33 = 24 × 36 . Similarly, a
number is a cube if the indices are multiples of 3, and so on.
We could then easily work the smallest multiple of a given number that will be cube say. If
96 = 25 × 3, then be multiplying by 2 × 32 = 18 we’d have a cube.
We can work out the number of factors of a number. Say we have 600 = 23 × 3 × 52 . Any
factor of 600 will be composed of up to three 2s, up to one 3, and up to two 5s, multiplied
together. That’s 4 possibilities for the number of twos used in a factor, 2 possibilities for the
number of threes and 3 for the number of fives. That’s 4 × 2 × 3 = 24 factors.
Sometimes you might have to think about this backwards: if a number has a certain number
of factors, what number could it be?
Note that we get a 0 on the end of a number each time we have a factor of 10. That’s
equivalent to each time we have a prime factor pair of 2 and 5. We can easily determine the
number 0s therefore by looking at the prime factorisation and taking the minimum power
out of the 2 and the 5.
Diophantine Equations
These are just equations where you want to find integer solutions for the variables.
Often the key to these questions is getting your equation in the form of a product of expressions
being equal to some integer value. e.g. If we wanted to find positive integer solutions to 𝑎(𝑏 + 1) =
12, then by considering the factor pairs of 12 and what 𝑎 and 𝑏 + 1 could therefore be, we get
(𝑎, 𝑏) = (1,11), (2,5), (3,3), (4,2), (6,1).
The challenge is often getting your equation in this form:

Suppose we had 𝑎𝑏 − 𝑎 − 𝑏 = 9. If we had some factorisation, and expanding it gave us the
terms 𝑎𝑏, −𝑎 and – 𝑏, then what could that factorisation be? (𝑎 − 1)(𝑏 − 1) sounds like it
might work. We find that (𝑎 − 1)(𝑏 − 1) = 𝑎𝑏 − 𝑎 − 𝑏 + 1.
Therefore 𝑎𝑏 − 𝑎 − 𝑏 = (𝑎 − 1)(𝑏 − 1) − 1 = 9, and thus (𝑎 − 1)(𝑏 − 1) = 10. We’ve
successfully got our equation in the form we have a product of expressions, so can now just
consider the factor pairs of 10.

1
2
3
Similarly, suppose we had 𝑥 + 𝑦 = 19. Then multiplying through by 19𝑥𝑦 so that we don’t
have to deal with fractions, we get 19𝑦 + 38𝑥 = 3𝑥𝑦. So 3𝑥𝑦 − 38𝑥 − 19𝑦 = 0.
The trick here is to multiply through by the coefficient of the product of the variables, i.e. 3.
Then 9𝑥𝑦 − (3 × 38)𝑥 − (3 × 19)𝑦 = 0
Then notice that (3𝑥 − 19)(3𝑦 − 38) = 9𝑥𝑦 − 38𝑥 − 19𝑦 + (2 × 192 ).
Thus (3𝑥 − 19)(3𝑦 − 38) = 2 × 192 . Because we have the prime factorisation of the RHS,
we can quickly obtain the factor pairs (e.g. 19 × 38).



Sometimes we can use the difference of two squares to factorise.
Suppose we want to find integer solutions for 𝑎2 + 200 = 𝑏 2.
Then 200 = 𝑏 2 − 𝑎2 = (𝑏 + 𝑎)(𝑏 − 𝑎). By considering factor pairs of 200, we get (𝑎, 𝑏) =
(49,51), (23,27) and so on.
One final common way to factorise is to complete the square. Suppose we were asked to
find the integer values of 𝑛 for which 𝑛2 + 20𝑛 + 11 is a perfect square.
𝑛2 + 20𝑛 + 11 = 𝑘 2 for some integer 𝑘.
Completing the square: (𝑛 + 10)2 − 100 + 11 = 𝑘 2
(𝑛 + 10)2 − 𝑘 2 = 89
(𝑛 + 10 + 𝑘)(𝑛 + 10 − 𝑘) = 89
And again, we’ve successfully produced a product of expressions. Conveniently, 89 is prime,
so 𝑛 + 𝑘 + 10 = 89 and 𝑛 − 𝑘 + 10 = 1.
Don’t forget that the factor pair could be negative! e.g. If we wanted positive integer
solutions for (𝑎 − 7)(𝑏 − 5) = 12, then since −3 × −4 = 12, it could be that 𝑎 − 7 = −3
and 𝑏 − 5 = −4, giving (𝑎, 𝑏) = (4,1). You’ll lose marks if you forget these solutions.
Linear Diophantine Equations
These are equations of the form 𝑎𝑥 + 𝑏𝑦 = 𝑐 where 𝑎, 𝑏, 𝑐 are constants. It’s called ‘linear’ because
it’s the equation of a straight line.
Suppose we had 4𝑥 + 3𝑦 = 31, and 𝑥 and 𝑦 have to be positive integers. We could try values for
one variable and see if they work for the other. e.g. When 𝑥 = 1, we find 𝑦 = 9. When 𝑥 = 2, we
have 3𝑦 = 23, which has no integer solution. In fact we’ll find that each time we increase 𝑥 by 3
(starting at our first solution of 𝑥 = 1), we’ll have another solution, because 4𝑥 will increase by a
multiple of 3 (i.e. 12), which can be ‘absorbed’ by the 3𝑦 term which will decrease. We know the
maximum 𝑥 can be is
31
4
rounded down, which is 7.
If the lone constant is a multiple of one of the numbers in front of (i.e. the ‘coefficients’ of) the 𝑥 or
𝑦, we can apply a clever trick to quicken our search!
e.g. Suppose that 4𝑥 + 13𝑦 = 130 and we’re again looking for positive integer solutions. We can
rewrite this as:
4𝑥 = 130 − 13𝑦 = 13(10 − 𝑦)
We can immediately see that 𝑦 is at most 9, otherwise the RHS will be 0 or negative, and so 𝑥
wouldn’t be positive on the LHS. If we think about factors on each side, the LHS is divisible by 4. On
the RHS, this factor of 4 certainly doesn’t appear in the 13, so 10 − 𝑦 must be divisible by 4. This
means that 𝑦 must be 2 or 6. We can then easily find 𝑥 for each of these.
The Factorial Function
𝑛! = 𝑛 × (𝑛 − 1) × (𝑛 − 2) × … × 2 × 1. For example 4! = 4 × 3 × 2 × 1 = 24. We would say this
as “4 factorial”.
If we wanted the number of 0s at the end of 100!, then recall we get a 0 at the end each time we
have a prime factor pair of 2 and 5. There will be more 2s then 5s in the prime factorisation of 100!,
so count the number of 5s. In 100 × 99 × …, we’ll have a factor of 5 for each multiple of 5 in the
product. There’s 20 of these. But we’ll get an additional 5 for each multiple of 25, because 25 = 5 ×
5, i.e. contributing two 5s rather than 1. There’s 4 multiples of 25 up to 100. Thus we have 524 in the
prime factorisation of 100! and thus 24 zeros at the end.
Miscellaneous Tips



If you have consecutive numbers or numbers which are evenly spaced, represent either the
middle number or first number as say 𝑛. e.g. If you have 3 consecutive numbers, we can
represent these as 𝑛 − 1, 𝑛 and 𝑛 + 1. This tends to make the algebra simpler (say if we
added or multiplied these expressions) than if we were to use 𝑛, 𝑛 + 1 and 𝑛 + 2.
Every 3 numbers is divisible by 3. So for example 𝑛(𝑛 + 1)(𝑛 + 2) must be divisible by 3
because one of 𝑛, 𝑛 + 1 and 𝑛 + 2 must be divisible by 3. Similarly every 4th number is
divisible by 4 and so on.
Suppose you’re trying to find an integer that makes some fractional expression an integer.
e.g. Find an integer 𝑛 such that
𝑛2 −4
is
𝑛−1
also an integer. There’s two ways to do this. If you
happen to know algebraic long division, then use that! But presuming you don’t notice that
if we had
𝑛2 −1
,
𝑛−1
we’d have an integer because 𝑛2 − 1 = (𝑛 + 1)(𝑛 − 1), which is divisible by
𝑛 − 1.


𝑛2 − 4 𝑛2 − 1 − 3 𝑛2 − 1
3
3
=
=
−
=𝑛+1−
𝑛−1
𝑛−1
𝑛−1 𝑛−1
𝑛−1
This whole expression is an integer when 𝑛 − 1 divides 3. If say 𝑛 was positive, then this
would only work when 𝑛 = 4.
A squared number is always positive. Suppose we had 𝑎2 − 𝑎𝑏 = 𝑏 where 𝑎 and 𝑏 are
positive integers. Then since the RHS must be positive, 𝑎𝑏 < 𝑎2 . Dividing by 𝑎 we have 𝑏 <
𝑎.
Sometimes we can use the quadratic formula. Recall that when 𝑎𝑥 2 + 𝑏𝑥 + 𝑐 = 0, then the
solutions for 𝑥 are 𝑥 =
−𝑏±√𝑏2 −4𝑎𝑐
.
2𝑎
Above, we had 𝑎2 − 𝑎𝑏 = 𝑏. Putting this in a quadratic form, where the ‘𝑥′ here is instead 𝑎,
we have 𝑎2 − 𝑏𝑎 − 𝑏 = 0, so:
𝑏 ± √1 + 4𝑏
2
Thus for 𝑎 to be an integer, √1 + 4𝑏 is an integer. We could then use the approach we saw
on Page 2.
𝑎=
Theorems in Number Theory:
1. Euclid’s First Theorem: If for integers 𝒂 and 𝒃 and a prime 𝒑, we have that 𝒑|𝒂𝒃, then
either 𝒑|𝒂 or 𝒑|𝒃.
2. Euclid’s Second Theorem: There are an infinite number of prime numbers.
Proof by contradiction: Suppose there were a finite number of prime numbers, 𝑝1 , 𝑝2 , ... 𝑝𝑛 .
Then consider 𝑝1 𝑝2 … 𝑝𝑛 + 1. This can’t be divisible by any of the primes because the
remainder will always be 1. Thus either the new number is prime, or its prime factorisation
consists only of new prime numbers. Hence we can always discover new primes given a
finite list.
3. Fermat’s Last Theorem: If 𝒂𝒏 + 𝒃𝒏 = 𝒄𝒏 where 𝒂, 𝒃, 𝒄 are positive integers, then the
equation cannot be satisfied when 𝒏 > 2.
If 𝑛 = 2, then we’d have 𝑎2 + 𝑏 2 = 𝑐 2 , for which there’s infinitely many solutions, e.g. 32 +
42 = 52 (these are known as Pythagorean Triples, because the 3, 4, 5 can be the lengths of a
right-angled triangle, satisfying Pythagoras’ Theorem). However, the sum of two cubes can
never be a cube, and so on.
This actually has some practical use! If somehow we managed to factorise an equation to
yield (𝑎 + 3)3 + (𝑐 − 𝑎)3 = (3𝑎 + 𝑏)3 (where 𝑎, 𝑏, 𝑐 are integers), then because by
Fermat’s Last Theorem, there can’t be any positive integer values for 𝑎 + 3 and 𝑐 − 𝑎 and
3𝑎 + 𝑏, and so we only have a solution when 03 + 03 = 03 , i.e 𝑎 + 3 = 0, 𝑐 − 𝑎 = 0 and
3𝑎 + 𝑏 = 0. This gives us the solution 𝑎 = −3, 𝑏 = 9, 𝑐 = −3.
4. Fermat’s Little Theorem: If 𝒂 is an integer and 𝒑 is prime, then 𝒂𝒑−𝟏 ≡ 𝟏 (𝒎𝒐𝒅 𝒑).
Equivalently, 𝒂𝒑 ≡ 𝒑 (𝒎𝒐𝒅 𝒑)
For example, suppose we had 1512 . Then we know that the remainder will be 1 when we
divide by 13. Similarly, we could say that 1512 − 1 is divisible by 13, or that 1513 − 15 is
divisible by 13.
5. Wilson’s Theorem: A number 𝑛 is a prime number if and only if (𝑛 − 1)! ≡ −1 (𝑚𝑜𝑑 𝑛). For
example, take 7. (7 − 1)! = 720. When we divide 720 by 7, we get a remainder of 6. This is
the same as -1 and modulo-7 arithmetic (because we can keep adding or subtracting 7 in
modulo-7 arithmetic and the number will be equivalent, thus a remainder of -1 can be
thought of as one less than a multiple of 7). Thus 7 must be a prime number.
And unsolved ones:
1. Goldbach’s Conjecture: Every even positive integer is the sum of two primes.
2. Twin primes are prime numbers which differ by 2, e.g. 41 and 43. It is unknown whether
there are infinitely many twin primes. However, as recently as 2013, it was proven that
there’s infinitely many prime pairs where the primes differ by at most 70 million.
Download