















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Number thoery in problem solving in explain fundamental theorems of arithmetics, properties of divisibility, factor, sigma and tau with given problem sloving.
Typology: Study notes
1 / 23
This page cannot be seen from the preview
Don't miss anything!
Number Theory concerns itself mostly with the study of the natural numbers ( N ) and the integers ( Z ). As a consequence, it deals a lot with prime numbers and sometimes with rational numbers ( Q ). Recall:
Definition. The natural numbers are the numbers N = {1, 2, 3,... }. The integers are the numbers Z = {... , −2, −1, 0, 1, 2,... }. The rational numbers are Q = { ab | a, b ∈ Z , b 6 = 0 }.
There is significant debate about whether the naturals include 0 or not. It’s probably easier to consider the naturals to be just the positive integers. If you want to specify the non-negative integers you may write N 0 or Z ≥ 0.
Notation. If an integer a divides an integer b we write a|b.
Definition. A prime number is a positive integer p 6 = 1 such that if p divides ab then p divides a or p divides b. Mathematically, we write this as p|ab =⇒ p|a or p|b
Remark. Note, when you get to university and learn about more advanced number theory, negatives of primes will also be included as primes, but we do not worry about that here. Also, note, that this is a different definition than you may have expected! What about the definition that says "p only has two factors: 1 and p"? That is the definition for a number that is irreducible. As you can imagine, this ends up being the same thing as prime numbers when you work with integers. Feel free to use that definition, if it suits you better.
Take a step back for a moment and think about the definition of a prime number that I used. Can we include rational numbers? Are there any rational primes? The answer to both questions is an emphatic no. The answer at first may be a bit disappointing and baffling, but it all follows from the fact that only certain groups of numbers have a concept of divisibility. We have divisibility in the integers, because of an amazing result called the Fundamental Theorem of Arithmetic.
The fundamental theorem of arithmetic allows us to factorise integers. There are other systems of numbers and objects that have this property, but you only learn about them at university. For positive integers, the statement is:
Fundamental Theorem of Arithmetic. Every positive integer n 6 = 1 can be written uniquely as a product of powers of primes. Mathematically, n = p α 1 1 p α 22 · · · p α kk
where the pi are primes and α i ∈ N.
So, how does this give us divisibility? Well, if a integer m can be written as a product of the same primes with the same or smaller powers, then it is called a factor of n and we write m|n. As an example, the integer 20 = 22 × 5, where the power on the five is a one of course. Then any of the following are factors:
1, 21 = 2, 22 = 4, 5, 2 × 5 = 10, 22 × 5 = 20.
In fact these six positive integers are all the positive factors of 20 as you can easily check for yourself.
Remark. Our discussion, is not complete if we do not mention negative integers. If 4 is a factor of 20, then −4 is a factor of 20 too. The minus does not change whether a number is a factor or not. Moreover, 1 and − 1 divide every integer. 0 does not divide any integer, but every non-zero integer divides 0.
One concept you may already be familiar with is the greatest common divisor.
Definition. The greatest common divisor of two integers a and b, denoted as gcd(a, b) (or sometimes just (a, b)), is the largest factor of a that is also a factor of b.
This is incredible powerful and this can be seen in the following problem.
Problem 1. For what integer n is (^2) nn+− 71 an integer?
Proof. If (^2) nn+− 71 is an integer, then n + 7 | 2 n − 1.
Using Theorem 1.4, we have that n + 7 | 2 (n + 7 ).
Employing the same theorem again, this time with subtraction we have
n + 7 | 2 (n + 7 ) − ( 2 n − 1 )
which after simplifying means n + 7 |15.
All the factors of 15 are −15, −5, −3, −1, 1, 3, 5, 15 and these are all the values that n + 7 can take, so the solutions are: n = −22, −12, −10, −8, −6, −4, −2, 8.
Notice, that negative solutions are of course allowed if the question does not specify otherwise!
Divisibility allows us to talk about factors. We shall for the moment limit our discussion to the positive integer factors of positive integers. We already know what they look like, but we would like to know a few more things. For example, how many are there? What is their sum?
Definition. For any positive integer n, denote by τ (n), the number of factors of n. Also, denote by σ (n) the sum of the factors of n.
The really amazing thing is that we have formulas for these.
Theorem 1.5. Let the prime factorisation of n be
n =
k
i= 1
p α i i= p α 1 1 p 2 α 2 · · · p α k k,
then
1 + pi + · · · + p α ii
1 + p 1 + · · · + p α 11
1 + pk + · · · + p α kk
A huge chunk of number theory problems are Diophantine equations (named after an Ancient Greek math- ematician Diophantus).
Definition. Diophantine equations are polynomial equations in one or more variables where the only desired solutions are integers.
The polynomial part essentially means you only have powers of variables with addition, subtraction and multiplication. I provide two simple examples.
Problem 2. Solve 2x + 5 y = 1 in integers.
Proof. Note that there are solutions to this since (2, 5) = 1. In fact, notice that rearranging yields
2 x = 1 − 5 y
In order for the right hand side to be even like the left hand side, it is clear that y must be odd. So, set y = 2 t + 1. Substituting yields 2 x = 1 − 5 ( 2 t + 1 ) = − 4 − 10 t
And so, x = − 2 − 5 t. In fact, (x, y) = (− 5 t − 2, 2t + 1 ) is the set of all solutions. Yes, it is true there are an infinite number of solutions for all possible integer values of t!
Another example of a Diophantine equation is Fermat’s Last Theorem.
Problem 3. Find all solutions in positive integers of the equation
xn^ + yn^ = zn
where n > 1.
Proof. This went unsolved for over 300 years and the person who solved it, Andrew Wiles, used really powerful mathematics to solve it. There are integer solutions only when n = 2 and then (x, y, z) = (k(a^2 − b^2 ), 2kab, k(a^2 + b^2 )) for a, b, k ∈ N. You shall prove the n = 2 case in section 4.
Modulo Arithmetic is a whole new world. It works almost exactly like normal equations, but you do not have to worry about things like size or infinity. Essentially, when working with modulo (or mod for short), you focus on the remainder upon division. So, if you want to see if something is divisible by 5, work in mod 5 and show that everything is zero!! The best analogy for modulo arithmetic (to get prepared for the mathematical technicalities) is clock arith- metic: as soon as you hit 12 o’clock, it’s like 0 o’clock and then you go to 1, then 2 and so on and the cycle repeats once you hit 12. There is a concept of 13 o’clock, but it’s the same as 1 o’clock! That is how I want you to think around mods.
First, the definition:
Definition. Given integers a, b,
a − b is a multiple of n ⇐⇒ a ≡ b (mod n).
Can you see what is going on? a ≡ b (mod n) when a and b leave the same remainder when divided by n.
Remark. Remember that 0 is considered to be multiple of everything, simply because 0 = n × 0.
The symbol ≡ works just like = does for the integers. You can perform (most) operations to both sides of an equation, and everything will simply work. This includes addition, subtraction and multiplication. Be careful about division. You cannot always divide (this will be explained a little further on). You can solve equations in exactly the same manner as you would for an ordinary equation.
Problem 4. Solve (x − 1 )(x + 2 ) ≡ (x − 2 )(x + 7 ) (mod n) if n is odd.
Proof.
(x − 1 )(x + 2 ) ≡ (x − 2 )(x + 7 ) (mod n) ⇒ x^2 + x − 2 ≡ x^2 + 5 x − 14 ⇒ x − 5 x ≡ − 14 − (− 2 ) (collect like terms) ⇒ − 4 x ≡ − 12 ⇒ 4 x ≡ 12 (multiply both sides by − 1 ) ⇒ x ≡ 3 (divide both sides by 4)
As you can see, we can add, subtract, multiply, expand and factorise as freely as you wish. However, we could only divide by 4 because n was relatively prime to 4. In general if you want to divide both sides of a modulo equation, then you have to divide the mod too (but only if you can). For example:
60 x ≡ 480 (mod 70) ⇒ 30 x ≡ 240 (mod 35) ⇒ 15 x ≡ 120 (mod 35) ⇒ 5 x ≡ 40 (mod 35) ⇒ x ≡ 8 (mod 7) ⇒ x ≡ 1 (mod 7)
This is like the “never divide by zero” rule. So, even though we were working mod 70 originally, this reduced down to mod 7 simply because we were dividing by numbers that had factors in common with the mod. So, when we divided by 2 in the first line, the mod had to be divided by 2. But when we did that in the second line, the mod stayed as 35, since (2, 35) = 1. In line we divide by 3 and so again the mod stays as 35, but when dividing by 5, we have to reduce the mod too. The last line comes from the fact that 8 ≡ 1 (mod 7). And so, the solution is all x ≡ 1 (mod 7), which are numbers like... , −13, −6, 1, 8, 15,...
a ≡ b (mod n) and x ≡ y (mod n) 6 =⇒ xa^ ≡ yb^ (mod n)
There are many counter examples, consider 2^5 = 32 6 ≡ 25 = 52 (mod 3). If you want to fiddle with large indices in a modulo equation, then you should probably use Fermat’s Little Theorem or Euler’s Theorem (see later).
a^2 ≡ b^2 6 =⇒ a ≡ ±b (mod n)
There are many counter examples, like mod 8: we have 1^2 ≡ 32 ≡ 52 ≡ 72 ≡ 1 (mod 8).
Prime numbers are way more interesting than composite numbers, In fact, the main reason why prime numbers are so popular is because everything works out nicely in (mod p). Here are a few of these extra handy tricks: Remember that the following tools ONLY work if p is prime.
abcd ≡ 0 ⇐⇒ a ≡ 0 , b ≡ 0 , c ≡ 0 or d ≡ 0
As an example, suppose 5x ≡ 0 (mod 7), then since 5 6 ≡ 0 (mod 7), it follows that x ≡ 0 (mod 7).
x−^1 x ≡ 1 (mod p)
As an example, in mod 7, 1−^1 = 1, 2−^1 = 4, 3−^1 = 5, 4−^1 = 2, 5−^1 = 3 and 6−^1 = 6. Check these! [eg. 2 × 4 = 8 ≡ 1]
So (mod p) is way more fun to work in than (mod n), but what if you have to work (mod n)? Is there a way to conclude something in (mod 30), whilst only working (mod 2), (mod 3) and (mod 5)? There is an answer, and it is called CRT:
Notice, how I filled out the table for numbers {0, 1, 2,... , n − 1 }. The reason is that as soon as you hit n again, it’s back to zero (like clock arithmetic), so the value for n^2 in the table will be the same as 0^2. Similarly, for 1^2 and (n + 1 )^2 and so on.
Problem 6. Find any solutions for x^2 + y^2 = 765483 in integers.
Proof. Consider the left hand side modulo 4. Each square (x^2 or y^2 ) is either 0 or 1 if we consult the appro- priate table. So, the left hand side is ≡ 0, 1 or 2 (mod 4). On the other hand, the right hand side 765483 ≡ 3 (mod 4), so the two sides can never be equal and there are no solutions!
This idea of quadratic residues generalises of course to higher powers. In fact, all we are doing is calculating the remainder in mod n when we take certain powers. The real question is why do we do this? As we saw in the example problem above, these residues can give us more information than we expect. For example, in mod 3 and 4, squares are only ≡ 0, 1. Mod 5 is slightly less useful because we have 0,1 and 4 being quadratic residues, so there are many more options available. It would be good to know which mod to use when certain powers are present in a problem. Here is a rough guide (although I would always recommend finding the right mod yourself as it may depend on the problem itself): Squares: mod 3, 4, 8 (mod 8) x x^2 0 0 1 1 2 4 3 1 4 0 5 1 6 4 7 1
Cubes: mod 7, 9
(mod 7) x x^3 0 0 1 1 2 1 3 6 4 1 5 6 6 6
(mod 9) x x^3 0 0 1 1 2 8 3 0 4 1 5 8 6 0 7 1 8 8
Fourth Powers: mod 5 (mod 5) x x^4 0 0 1 1 2 1 3 1 4 1
Remark. This is even better than it looks, since 8 ≡ − 1 (mod 9) and 6 ≡ − 1 (mod 7).
How did I get these numbers? They come from Euler’s Theorem below. The corresponding result for prime numbers is called Fermat’s Little Theorem.
One of the oldest results in number theory is Fermat’s little theorem:
Fermat’s Little Theorem. For all x and primes p,
xp^ ≡ x (mod p)
Also, if x is coprime to p (has no factor of p), then
xp−^1 ≡ 1 (mod p)
The second form is more common and more useful, since the first version has to take into account what happens to numbers ≡ 0 (mod p), which is easy anyway.
Problem 7. What is the remainder when you divide 655^758 by 7?
Proof. Since 655 ≡ 4 (mod 7), we really are trying to work out the remainder when 4^758 is divided by 7. But since (4, 7) = 1, we can apply Fermat’s little theorem to get that 4^6 ≡ 1 (mod 7). We now have enough information to solve the problem.
655758 ≡ 4758 (mod 7)
≡
× 42 (mod 7)
≡ 1126 × 16 (mod 7) ≡ 1 × 2 = 2 (mod 7)
So, the remainder is 2.
If you’re not working with primes, as will often happen it is important to be able to simplify large powers in a similar way. There is a theorem called Euler’s Theorem that does exactly this, however, first you need to know about the Euler totient function, φ.
Definition. The Euler totient function, or Euler phi function, denoted by φ (n) counts how many numbers are coprime to n and less than or equal to it.
So, for example, clearly
φ ( 1 ) = 1, φ ( 2 ) = 1, φ ( 3 ) = 2, φ ( 4 ) = 2, φ ( 5 ) = 4, φ ( 6 ) = 2.
One can see that φ (p) = p − 1 when p is prime and this is easy to verify from the definition. It gets way more complicated when n is not prime. But there is a formula for it.
Theorem 2.1. For n =
k ∏ i= 1
p α i i= p α 11 · · · p α k k, we have
φ (n) =
k
i= 1
(pi − 1 )p α i i^ −^1 = (p 1 − 1 ) · · · (pk − 1 )p α 1 1 −^1 · · · p α k k^ −^1.
We shall prove this is in one of the problems for this section. We are now ready to see Euler’s theorem.
Euler’s Theorem. For integers a and n such that (a, n) = 1 , it follows that
a φ (n)^ ≡ 1 (mod n).
(c) Now, compute φ (p α ) where p is prime. (d) Put all the preceding parts together to find the formula for φ (n).
Justify your answer.
an = 2 n^ + 3 n^ + 6 n^ − 1 , n ≥ 1.
We have talked in great detail about one of the unique properties of integers: divisibility. First, in the Divisi- bility section we discussed when a number divides another. Then, in the Congruences section, we discussed when a number does not divide a number (and hence leaves a remainder). Now, it’s time to use the other major property of integers: they are discrete. The discreteness of integers essentially means that there is a gap between each consecutive integer.
Discrete Inequality. If m and n are both integers and m > n, then m ≥ n + 1.
It’s such a simple fact, and yet it gives us powerful tools as well. The following subsections expand on this, even if the connection to discreteness is not evident (see if you can work it out!)
Before, we start on any techniques associated to bounding here is a key fact about positive integers:
Theorem 3.1. If a and b are positive integers, and a|b, then a ≤ b.
This immediately suggests trying to factorise complicated expressions wherever possible. Very often, one will have an expression with variables on one side and integers on the other, so it gives one an idea of what the variable factors are likely to be. We begin with a very important problem, since many problems reduce to something similar.
Problem 8. Solve in integers a, b, the equation
1 a
b
Proof. Multiplying the whole equation by 2ab yields 2b + 2 a = ab, which rearranges to
ab − 2 a − 2 b = 0.
This is the important form I was referring to. Factorising this is easy, if you add an integer to make it work. Specifically, if we rewrite this as ab − 2 a − 2 b + 4 = 4
the left hand side is simply (a − 2 )(b − 2 ), so we have that a − 2 and b − 2 are factors of 4, which we can easily see are −4, −2, −1, 1, 2, 4. This gives the solutions (a, b) = (−2, 1),(0, 0), (1, − 2 ), (3, 6), (4, 4), (6, 3), where we remove the (0, 0) because it wouldn’t allow the fractions of the problem.
Now, the reason why this previous theorem is so crucial is because it limits the possible solutions. Remember at the beginning of the problem if all you know is that the number (or numbers) you are looking for are integers or even just positive integers, then there are still an infinite number of possibilities! Cutting it down to a finite number of possibilities is (mind the pun!) infinitely better. At that point, you can continue trying to make the bound stronger, or alternatively, try each remaining case. Trying a small amount of cases that are left is called a case bash and it’s really important that it covers all the remaining cases for the proof to be rigorous.
Remark. Regardless of whether or not the solutions have been successfully bounded yet, you should definitely try the small cases anyway, in case they give you a good intuition for how to do the problem in general!
One of the methods that you have already seen that is very good for bounding is the use of ’Without Loss of Generality’ (or WLOG). When the problem is symmetric in some variables, you may assume an ordering of them, which can give you some ideas about the size of the solutions. For more details consult the Method of Proof series of notes. Using the same problem, I will demonstrate the use of WLOG.
In the first handout on divisibility, we talked about divisibility of integers. The same idea works for poly- nomials, which are evaluated at integer values. The idea is to have a higher degree polynomial dividing a smaller degree polynomial. This is unlikely to be true for many integers, so the idea is to work out after what number the higher degree expression becomes too big to divide the other expression. Then just try all the remaining values.
Problem 11. Find all positive integers a, b such that a|b + 1 and b|a + 1.
Polynomial division is really going to help us out here. In each of the division statements in the problem, we have a degree 1 term dividing a degree 1 term, but there is no easy simplification, since we don’t know any relation between a and b. The 1s are really going to help us out. The trick is multiplying the two expressions together.
Proof. Multiplying the two division statements together yields ab|ab + a + b + 1. Since ab|ab, this gives us
ab|a + b + 1.
Your intuition should immediately tell you that the left hand side looks to big. Since the statement is com- pletely symmetric in a and b, WLOG a ≤ b and we get
ab ≤ a + b + 1 ≤ 2 b + 1 ≤ 3 b.
So a ≤ 3. Try a = 1. From the statements in the problem, we get b|2, so b = 1 or b = 2 and both work!. Try a = 2. From the statements in the problem, we get 2|b + 1 and b|3. So, from the second of these we get b = 3 (since b ≥ a) and this satisfies the first, so it’s a valid solution. Try a = 3. We get 3|b + 1 and b|4. Since b ≥ a, b = 4, but this does not satisfy a|b + 1, so there is no solution here. So, all the solutions are (a, b) = (1, 1), (1, 2), (2, 1), (2, 3), (3, 2) (after we remove the WLOG).
Having studied mathematics at school, you are probably getting quite familiar with many functions: con- stant, linear, quadratic, polynomial, exponential, logarithmic etc. You probably have an intuition for how quickly they grow. So, if the problem contains two or more different functions, for really large numbers one of the functions is quite likely to be significantly bigger than the others. As a rough guide, here is the order in how quickly functions grow.
Remark. This is only a very rough guide and it won’t be true at all values of x. Also, importantly the other numbers in these functions can make things wrong if you aren’t careful. Make sure you are very comfortable with these types of functions.
Proving that something grows faster and hence is eventually much bigger is actually quite hard to do. Induc- tion is often very useful. Also, to prove higher degree polynomials or exponentials grow faster than linear functions, the following is a cool inequality to know.
Theorem 3.2. For every integer r ≥ 2 and every real number x ≥ − 1 , it follows that
( 1 + x)r^ > 1 + rx.
Remark. This is also called Bernoulli’s Inequality. It’s very useful when you want to explain that higher degree powers grow way faster than linear functions.
Remark. Clearly, this inequality is actually an equality for r = 0, 1. Also, note if r is even, then it’s true for all reals x. The inequality also generalises to all real numbers r > 1 and interestingly is reversed for r ∈ (0, 1).
For an example of this being used, see the next example problem in the Greatest Common Divisor subsection below.
Any two positive integers always have a greatest common divisor. The idea is to make use of this to simplify problems. For example, suppose your problem involves m and n. Call d = gcd(m, n). Then let m = ad and n = bd. Since d is the greatest common divisor, it follows that (a, b) = 1.
Remark. Don’t forget to utilise the fact that gcd(m, p) where p is prime is either 1 or p. Similarly, the gcd of two distinct primes is of course 1.
It is a little subtle how the gcd can help, but here is an example where the use of the gcd actually shows one of the numbers is a multiple of the other very easily.
Problem 12. Solve mn^ = nm^ in positive integers m, n.
Proof. First, WLOG m ≥ n. Next, call d = gcd(m, n). Then let m = ad and n = bd, and hence, it follows that (a, b) = 1 and a ≥ b. Substituting yields (ad)n^ = (bd)m. Since m ≥ n, it follows that
an^ = bmdm−n.
The key here is that, therefore, bm|an, so any prime that divides b must also divide a, but (a, b) = 1, so there are no primes that divide b. So, b = 1. [Note, this actually means n|m, since n = d.] We now, have an^ = nan−n.
Since nan−n^ =
na−^1
)n , both sides are powers of n, so we take the nth^ root of both sides. Thus,
a = na−^1.
It is really intuitive that the right hand side is almost always way bigger than the left hand side. We shall use Bernoulli’s inequality to reduce the amount of cases we need to check significantly.
na−^1 > 1 + (a − 1 )(n − 1 ) = 2 − a − n + an
It is now sufficient to show that when a ≥ 3 and n ≥ 2, we have 2 − a − n + an ≥ a. This is true since subtracting a from both sides and factorising yields (a − 1 )(n − 2 ) ≥ 0 which is obviously true from the fact that a ≥ 3 and n ≥ 2. So, na−^1 > a and there are no solutions in this case.
So, all the solutions are (m, n) = (2, 4), (4, 2), (k, k) for all k ∈ N.
In the previous three number theory handouts, you will have learnt a rather expansive amount about divis- ibility, remainders (modulo) and about bounding techniques. Of course, there are many other less common techniques that you will need to learn the hard way: by finding them yourself by solving problems. The problems at the end of this set of notes are general number theory problems for you to practice what you have learnt so far. In this hand out, I provide some very key results in elementary number theory that it would be prudent to know.
Definition. A Pell’s equation is of the form x^2 − ay^2 = 1
where a, x, y are all integers and a is not a square. A generalised Pell’s equation is of the form x^2 − ay^2 = b
where a, b, x, y are all integers and a is not a square.
As you can see Pell’s equation is a Diophantine equation, and interestingly, is actually an equation that Diophantus himself worked on. Pell’s equations do come up a bit and so it is worth knowing the following facts.
Theorem 4.1. Given a Pell’s equation x^2 − ay^2 = 1,
if the equation has a solution, then it has an infinite number of solutions.
The theorem above is what we call an existence theorem since it does not tell us how to find these solutions, rather it tells us they exist (under certain circumstances). There is a modern solution to Pell’s equation, which follows easily from continued fractions (which is a rather difficult concept in itself). I sketch the ideas here, and you will prove the details in the problems attached.
Definition. Given a Pell’s equation x^2 − ay^2 = 1 with a fixed, consider all pairs (xi, yi) with xi, yi ∈ N , which are solutions to the equation. The fundamental solution (x 1 , y 1 ) is the pair such that x 1 +
ay 1 is a minimum over all (xi, yi). [In other words, x 1 +
ay 1 ≤ xi +
ayi for all i.]
It actually follows the fundamental solution is unique.
Lemma 4.2. If a solution to the Pell’s equation x^2 − ay^2 = 1 exists for a fixed a, then by the well-ordering principle, a fundamental solution exists. Call it (x 1 , y 1 ) as standard. Then all the other positive integer solutions are given by
xn +
ayn = (x 1 +
ay 1 )n.
What this means is that when you expand the right hand side and collect all the non-
√ a^ terms and all the a terms separately, then the coefficients will be xn and yn respectively.
Problem 13. Find all solutions in positive integers x, y to x^2 − 3 y^2 = 1.
Proof. We immediately, see that (x, y) = (2, 1) is a solution. It turns out to be the fundamental solution, since the only solution that could be smaller is (1, 1), but that does not satisfy the Pell’s equation. So, all the solutions are given by xn +
ayn = ( 2 +
3 )n.
As an example, we calculate that the first few solutions are (2, 1), (7, 4), (26, 15),... [Check this!]
If we are dealing with a generalised Pell’s equation, then the lemma can be altered as follows:
Lemma 4.3. If there is at least one solution to the Pell’s equation x^2 − ay^2 = 1 and to the generalised Pell’s equation x^2 − ay^2 = b for fixed a and b, then by the well-ordering principle, a fundamental solution exists for both. Call them (x 1 , y 1 ) and (x 1 ′, y′ 1 ) respectively. Then all the other positive integer solutions are given by
xn +
ayn = (x 1 +
ay 1 )n−^1 (x′ 1 +
ay′ 1 ).
Remark. If a solution does not exist for the generalised Pell’s equation, try using a quadratic residue argument to prove it.
We are all familiar with Pythagoras’ Theorem for geometry. In number theory, we are less interested in the right angled triangle and more interested in the equation
x^2 + y^2 = z^2.
This is in fact, very famous on its own as the case n = 2 of Fermat’s Last Theorem, which turns out to only have solutions in this particular case. Look this up!
Definition. A triple of non-zero integers (x, y, z) satisfying the equation x^2 + y^2 = z^2 is called a Pythagorean triple. Moreover, it is called a primitive Pythagorean triple if there is no prime that simultaneously divides x, y and z.
Turns out that Pythagoras’ theorem has been solved in integers. In fact, you will solve it in the problems attached.
Theorem 4.4. All primitive integer solutions to x^2 + y^2 = z^2 are given by
(x, y, z) = (a^2 − b^2 , 2ab, a^2 + b^2 ) for some a, b ∈ N and a > b.
This, of course means that if you want all Pythagorean triples, just multiply all three numbers by any integer k to get
(x, y, z) =
(a^2 − b^2 )k, 2abk, (a^2 + b^2 )k
for some a, b, k ∈ N and a > b.
Quadratic reciprocity is one of the most famous results in elementary and non-elementary number theory. First proven by Gauss, it basically refers to whether or not a number is a quadratic residue modulo a prime.
Definition. For all integers a and primes p define the Legendre symbol:
( a p
0 a ≡ 0 (mod p) 1 a 6 ≡ 0 is a quadratic residue (mod p) − 1 a 6 ≡ 0 is not a quadratic residue (mod p)
Be careful, the Legendre symbol looks just like a fraction. Unless something is specified to be the Legendre symbol, it is just a fraction. Then the following is the classical statement of quadratic reciprocity:
Quadratic Reciprocity Theorem. For odd primes, p, q we have ( p q
q p
p− 1 2 ×^ q− 1 (^2).
Moreover, (^) ( − 1 p
p− 1 2
p
p^2 − 1 8
where all the lefthand sides are Legendre symbols.
We shall not prove this, but there are more than 200 proofs in existence, so I would strongly suggest having a look at the literature out there.