MathComps LogoMathComps
ProblemsHandoutsGuideNews
Sign in

Proof Basics

Proofs
Author
Patrik Bak

1Introduction

The common perception of mathematics is that it is about calculation. In reality, however, it is about understanding generally valid statements. To be certain that these are indeed valid statements, and not just some measurement error, we precisely justify, or prove, these statements. It should therefore come as no surprise to us that proofs are an integral part of the Mathematical Olympiad, as well as university courses. In this material, we will provide a basic overview of what proofs look like in mathematics. We will illustrate them with several examples. The illustrative examples will mainly concern numbers, where the principles are best illustrated. However, the described theory can of course be applied in other areas – we will encounter proofs in all materials.

2Basic Types of Proofs

In general, we distinguish two basic types of proofs: direct proof and proof by contradiction. In short:

  • Direct proof: We derive the statement to be proved from valid statements.
  • Proof by contradiction: We assume that the statement to be proved does not hold and try to derive a mathematically invalid statement, to reach a contradiction.

We can imagine this as follows: Let's say that all the statements we start from are in a large pot of soup. The process of proving consists of combining statements from the soup and adding new ones from them – for example, if we have a3=1a^3=1a3=1 in the soup, we can add a=1a=1a=1 to the soup, thanks to which we can add a4−2a+1=0a^4-2a+1=0a4−2a+1=0 to the soup, etc. We then view our two types of proofs as follows:

  • A direct proof works by gradually adding new and new statements to the soup until we add the one we aim to prove.
  • On the other hand, in a proof by contradiction, we add the negation of the statement to be proved to the soup and proceed as if we were proving directly. We add new statements until the soup curdles and we get some nonsense, such as 0=10=10=1, or the opposite of one of the assumptions.

In the following two sections, we will show specific interesting examples of proofs. But first, two notes:

  • A very important technique is proof by mathematical induction. Strictly speaking, this is not so much a type of proof as it is a recipe for adding new valid statements to the soup.
  • In school, a distinction is usually made between two types of indirect proofs: indirect proof by contradiction and proof by contrapositive. We will explain that the latter is actually a special case of proof by contradiction.

2.1Direct Proof

Direct proofs are quite natural – we combine assumptions from the problem statement with existing knowledge until we reach the statement to be proved. Every proof can therefore be written as a series of chains of implications:

Example 1

Prove that the squares of odd numbers leave a remainder of 1 when divided by 8.

✓Solution

First, let's take this complete written proof:

Odd numbers can be written in the form m=2n+1m=2n+1m=2n+1 for an integer nnn. We are proving that m2=(2n+1)2=4n(n+1)+1m^2=(2n+1)^2=4n(n+1)+1m2=(2n+1)2=4n(n+1)+1 leaves a remainder of 1 when divided by 8. One of the numbers nnn, n+1n+1n+1 is even, so n(n+1)n(n+1)n(n+1) is an even number, so 4n(n+1)4n(n+1)4n(n+1) is divisible by 8, so m2=4n(n+1)+1m^2=4n(n+1)+1m2=4n(n+1)+1 leaves a remainder of 1 when divided by 8, which was to be proved.

Before we go further, let's realize the structure of that proof. It consists of these statements:

  • V0V_0V0​: mmm is an odd integer
  • V1V_1V1​: m=2n+1m=2n+1m=2n+1 for some integer nnn
  • V2V_2V2​: nnn is an integer, thus nnn is even or n+1n+1n+1 is even
  • V3V_3V3​: n(n+1)n(n+1)n(n+1) is even
  • V4V_4V4​: 4n(n+1)4n(n+1)4n(n+1) is divisible by 8
  • V5V_5V5​: 4n(n+1)+14n(n+1)+14n(n+1)+1 leaves a remainder of 1 when divided by 8
  • V6V_6V6​: (2n+1)2(2n+1)^2(2n+1)2 leaves a remainder of 1 when divided by 8
  • V7V_7V7​: m2m^2m2 leaves a remainder of 1 when divided by 8

The proof consists of the transitions V0⇒V1V_0 \Rightarrow V_1V0​⇒V1​ and V2⇒V3⇒V4⇒V5⇒V6V_2 \Rightarrow V_3 \Rightarrow V_4 \Rightarrow V_5 \Rightarrow V_6V2​⇒V3​⇒V4​⇒V5​⇒V6​. By combining V1V_1V1​ and V6V_6V6​ we get V7V_7V7​.

A verbal description is obviously more practical than a bulleted one. Its problem may be that more complicated problems can get lost in it: Poorly written solutions often fail because the implications are not clear from the text. Practical advice: for every statement, ask yourself the question: is it clear what the assumptions are and how something was derived from them? With such self-checking, one often realizes that their solution has a mistake.

Exercise 1

Prove that for prime numbers p≥5p \ge 5p≥5, it holds that p2−1p^2-1p2−1 is a number divisible by 24.

✓Solution

We decompose the expression into the product (p−1)(p+1)(p-1)(p+1)(p−1)(p+1). Since ppp is a prime number greater than 3, it is not divisible by 3, so it gives a remainder of 1 or 2. In the first case, 3 divides the factor p−1p-1p−1, in the second p+1p+1p+1. At the same time, ppp is odd, so p−1p-1p−1 and p+1p+1p+1 are two consecutive even numbers. One of them is therefore divisible by 2 and the other even by 4, so their product is divisible by 8. Since the number p2−1p^2-1p2−1 is divisible by both 3 and 8, and these numbers are coprime, it is also divisible by 24.

As an interesting aside, let us present another solution that uses the result from the previous example: squares of odd numbers leave a remainder of 1 when divided by 8. Thanks to this, we actually have that p2−1p^2-1p2−1 is divisible by 8 – it remains to justify that p2−1p^2-1p2−1 is divisible by 3. Since ppp is not 3, ppp has the form either 3k+13k+13k+1 or 3k−13k-13k−1 for some kkk, in short p=3k±1p=3k \pm 1p=3k±1. Then

p2−1=(3k±1)2−1=9k2±6k=3(3k2±2k),p^2-1 = (3k \pm 1)^2 - 1 = 9k^2 \pm 6k = 3(3k^2 \pm 2k),p2−1=(3k±1)2−1=9k2±6k=3(3k2±2k),

which is clearly divisible by three.

In harder problems, it may not be immediately obvious how to use the assumptions from the problem statement and it is necessary to analyze the situation.

Example 2

Prove that if a natural number nnn is the square of an integer, then it has an odd number of divisors.

✓Solution

How to use the fact that nnn is the square of an integer? We can write n=m2n=m^2n=m2, which was the first step in the previous illustrative example – but that won't help us for long. The key is to think about divisors, after all, we are proving something about them. The basic idea is:

Divisors of a natural number typically come in pairs, ddd is a divisor of nnn if and only if n/dn/dn/d is a divisor of nnn. If it never happened that these are the same divisors, then the number of divisors of nnn is even.

But when does it happen that this pairing pairs a divisor with itself? Exactly when d=n/dd=n/dd=n/d, i.e., when d2=nd^2=nd2=n. And that is exactly our assumption! Consequently, all divisors except the divisor n\sqrt{n}n​ will pair up with someone, so in total we will have an odd number of divisors, which was to be proved.

Note. This example actually holds as an equivalence. In fact, it would be easier if the reverse implication were given, because the fact that it is a square is used only at the end of the reasoning chain. In competition problems, however, it is common for authors to try to mask these key steps.

The previous example can also be solved using the generally useful formula for the number of divisors:

Theorem 1

Let n=p1a1⋅p2a2⋯pkakn=p_1^{a_1} \cdot p_2^{a_2} \cdots p_k^{a_k}n=p1a1​​⋅p2a2​​⋯pkak​​, where p1,p2,…,pkp_1,p_2,\dots,p_kp1​,p2​,…,pk​ are distinct prime numbers and a1,a2,…,aka_1,a_2,\dots,a_ka1​,a2​,…,ak​ are integers. Then the number nnn has exactly

(a1+1)(a2+1)⋯(ak+1)(a_1+1)(a_2+1)\cdots (a_k+1)(a1​+1)(a2​+1)⋯(ak​+1)

divisors.

Proof

Consider an arbitrary divisor ddd of nnn. Since ddd divides nnn and the prime factorization of nnn contains only the primes p1,…,pkp_1,\dots,p_kp1​,…,pk​, the factorization of ddd must also contain only these primes. We can therefore write d=p1b1⋅p2b2⋯pkbkd = p_1^{b_1} \cdot p_2^{b_2} \cdots p_k^{b_k}d=p1b1​​⋅p2b2​​⋯pkbk​​. For each iii, we must have 0≤bi≤ai0 \leq b_i \leq a_i0≤bi​≤ai​ (the upper bound follows from the fact that ddd, as a divisor of nnn, cannot contain a higher power of pip_ipi​ than nnn does). Every divisor can thus be uniquely represented as a kkk-tuple (b1,…,bk)(b_1,\dots,b_k)(b1​,…,bk​) satisfying 0≤bi≤ai0 \leq b_i \leq a_i0≤bi​≤ai​. The number of divisors is therefore equal to the number of such kkk-tuples.

To determine the number of kkk-tuples, we use the combinatorial rule of product. The choices of the individual exponents b1,…,bkb_1,\dots,b_kb1​,…,bk​ are independent of one another – the value of bib_ibi​ does not restrict the values of the other exponents in any way. For the exponent bib_ibi​, we have ai+1a_i+1ai​+1 options, namely all integers from 000 to aia_iai​. By the rule of product, the total number of kkk-tuples is

(a1+1)(a2+1)⋯(ak+1).(a_1+1)(a_2+1)\cdots (a_k+1).(a1​+1)(a2​+1)⋯(ak​+1).

Exercise 2

Prove the previous example, i.e., the theorem about the oddness of the number of divisors of perfect squares, using the theorem on the number of divisors. Also prove the reverse implication of this theorem.

✓Solution

Let n=p1a1⋅p2a2⋯pkakn = p_1^{a_1} \cdot p_2^{a_2} \cdots p_k^{a_k}n=p1a1​​⋅p2a2​​⋯pkak​​. Since nnn is the square of an integer, all exponents a1,…,aka_1, \dots, a_ka1​,…,ak​ must be even. According to the theorem, the number of divisors is equal to the product (a1+1)(a2+1)⋯(ak+1)(a_1+1)(a_2+1)\cdots(a_k+1)(a1​+1)(a2​+1)⋯(ak​+1). Since each aia_iai​ is even, each parenthesis represents an odd number. The product of odd numbers is always odd, thus the number of divisors is odd.

Problem 1

Given a composite number n>1n > 1n>1. Prove that it is divisible by a prime number not exceeding n\sqrt{n}n​.

1Hint

The number nnn is composite, let's write it as ababab, where 1<a≤b<n1<a \leq b<n1<a≤b<n.

2Hint

The idea is to say that the smaller of the numbers a,ba,ba,b, i.e., aaa, is divisible by a sufficiently small prime. To do this, it suffices to say that it is sufficiently small in itself (in the tightest case, it is a prime itself).

✓Solution

Since nnn is composite, we can write it as n=abn=abn=ab, where 1<a≤b<n1 < a \le b < n1<a≤b<n. Multiplying the inequality a≤ba \le ba≤b by the number aaa, we get a2≤ab=na^2 \le ab = na2≤ab=n, from which a≤na \le \sqrt{n}a≤n​. The number a>1a>1a>1 has at least one prime divisor ppp. Clearly p≤a≤np \le a \le \sqrt{n}p≤a≤n​. Since ppp divides aaa and aaa divides nnn, then ppp divides nnn, which we wanted to prove.

Problem 2*

A natural number nnn has exactly kkk divisors. Prove that the product of the divisors of nnn is equal to nk\sqrt{n^k}nk​.

1Hint

Use the trick with the paired divisor again.

2Hint

Distinguish the cases where nnn is and is not a square.

✓Solution

In the solution, we will consider the pairing of divisors: ddd is a divisor of nnn if and only if n/dn/dn/d is a divisor of nnn. The product of such divisors is nnn.

Let's analyze two cases:

  • If nnn is not a square, then for every divisor d≠n/dd \neq n/dd=n/d holds (otherwise d2=nd^2=nd2=n). All kkk divisors thus form exactly k/2k/2k/2 such pairs. The total product is nk/2=nkn^{k/2} = \sqrt{n^k}nk/2=nk​.
  • If nnn is a square, then d=nd=\sqrt{n}d=n​ forms a pair with itself. The remaining k−1k-1k−1 divisors form (k−1)/2(k-1)/2(k−1)/2 pairs with product nnn. The total product is therefore
    nk−12⋅n=nk2−12+12=nk.n^{\frac{k-1}2} \cdot \sqrt{n} = n^{\frac{k}2 - \frac12 + \frac12} = \sqrt{n^k}.n2k−1​⋅n​=n2k​−21​+21​=nk​.

To conclude this section, one important note. When writing proofs, a common imprecision is omitting assumptions, for example someone may write x2=1x^2=1x2=1, so necessarily x=1x=1x=1. This can be a valid part of a solution, provided the problem statement tells us that xxx is positive. However, if we do not include this assumption in the solution, it sounds suspicious because it is unclear whether the solver was aware of it, and therefore may lead to a loss of points. Correctly, we would write something like x2=1x^2=1x2=1 and xxx is positive, so necessarily x=1x=1x=1. Let us illustrate a very common situation where this occurs:

Example 3

When does a∣ba \mid ba∣b and b∣ab \mid ab∣a hold for integers a,ba,ba,b?

✓Solution

The intuitive answer is that necessarily a=ba=ba=b. In solutions, we sometimes indeed see the reasoning that a∣ba \mid ba∣b and b∣ab \mid ab∣a, so a=ba=ba=b. This is indeed true if we know that the numbers a,ba,ba,b are non-negative. Let us analyze the situation in detail:

The relation a∣ba \mid ba∣b gives that there exists an integer uuu such that b=aub=aub=au. Similarly, b∣ab \mid ab∣a means that there exists an integer vvv such that a=bva=bva=bv. Multiplying these equalities, we have ab=abuvab=abuvab=abuv.

If ab=0ab=0ab=0, i.e., if for example a=0a=0a=0, then the relation b=aub=aub=au gives b=0b=0b=0. Then both relations mean 0∣00 \mid 00∣0, which is fine† and a=ba=ba=b holds.

If ab≠0ab\neq 0ab=0, then ab=abuvab=abuvab=abuv gives 1=uv1=uv1=uv. The number 111 can be written as a product of integers in exactly two ways: 1⋅11 \cdot 11⋅1 and (−1)⋅(−1)(-1) \cdot (-1)(−1)⋅(−1). This gives us two solutions (u,v)=(1,1)(u,v)=(1,1)(u,v)=(1,1) and (u,v)=(−1,−1)(u,v)=(-1,-1)(u,v)=(−1,−1), which correspond to a=ba=ba=b and a=−ba=-ba=−b. If, however, a,ba,ba,b are non-negative, then either one is zero, which was resolved above, or both are positive, which cannot happen when a=−ba=-ba=−b – so in that case we would indeed have a=ba=ba=b.

The conclusion is that a∣ba \mid ba∣b and b∣ab \mid ab∣a if and only if a=ba=ba=b or a=−ba=-ba=−b, and for non-negative numbers even directly a=ba=ba=b.

2.2Proof by Contradiction

This type of proof is particularly useful in cases where what is being proved is hard to grasp and it is far simpler to say something about its negation. A very common example where this is illustrated:

Example 4

Prove that the number 2\sqrt{2}2​ is irrational.

✓Solution

We proceed by contradiction. Assume that 2\sqrt{2}2​ is a rational number, i.e., it can be written as a fraction pq\frac pqqp​ in simplest form (numbers p,qp, qp,q are coprime). After squaring and multiplying by the denominator, we get p2=2q2p^2=2q^2p2=2q2.

The right side is divisible by two, so p2p^2p2 and subsequently ppp must also be even, i.e., p=2kp=2kp=2k. By substituting, we have (2k)2=2q2(2k)^2=2q^2(2k)2=2q2, which simplifies to 2k2=q22k^2=q^22k2=q2. Now we see that qqq must also be even. The numbers ppp and qqq are thus both divisible by two, which is a contradiction with the assumption that they are coprime.

Exercise 3

This proof would not pass if we had 4\sqrt{4}4​. Where would it fail?

✓Solution

It would fail in the step where we try to show that qqq is also divisible. We would have the equation p2=4q2p^2=4q^2p2=4q2, from which it follows that ppp is even, i.e., p=2kp=2kp=2k. However, by substituting, we get 4k2=4q24k^2=4q^24k2=4q2, which after canceling simplifies to k2=q2k^2=q^2k2=q2. From this equality, it does not follow that qqq is even (nor divisible by 4). Thus, we do not get a contradiction with the coprimality of p,qp, qp,q.

Exercise 4

Prove the generalization of the statement about the irrationality of 2\sqrt{2}2​: Let nnn be a natural number. The number n\sqrt{n}n​ is irrational if and only if there exists a prime number ppp which appears in the prime factorization of nnn with an odd power.

✓Solution

We proceed by contradiction. Let n=ab\sqrt{n} = \frac abn​=ba​ for coprime a,ba, ba,b. We rearrange the equation to nb2=a2nb^2 = a^2nb2=a2. In the prime factorization of a square (a2a^2a2 and b2b^2b2), every prime number has an even exponent. On the left side, the exponent of any prime number is the sum of its exponent in nnn and in b2b^2b2. For equality to hold, this sum must be even, which means that the exponent of every prime number in nnn must be even. Thus, if nnn contains a prime number with an odd power, we get a contradiction. Conversely, if all exponents are even, nnn is a square and n\sqrt{n}n​ is a rational number.

Problem 3

Prove that the sum of a rational and an irrational number is an irrational number.

1Hint

We proceed by contradiction. What if for rational r1,r2r_1,r_2r1​,r2​ and irrational r′r'r′ it holds that r1+r′=r2r_1+r'=r_2r1​+r′=r2​?

✓Solution

We proceed by contradiction. Let r1r_1r1​ be rational and r′r'r′ be an irrational number. Assume that their sum r2=r1+r′r_2 = r_1 + r'r2​=r1​+r′ is rational. Then we can express r′=r2−r1r' = r_2 - r_1r′=r2​−r1​. Since the difference of two rational numbers is always a rational number, r′r'r′ must also be rational. However, this is a contradiction with the assumption that r′r'r′ is irrational.

Problem 4

Prove that the number 2+3\sqrt{2}+\sqrt{3}2​+3​ is irrational.

1Hint

We proceed by contradiction. Let 2+3=r\sqrt{2}+\sqrt{3}=r2​+3​=r. We need to get rid of the roots.

2Hint

The key to getting rid of the roots is squaring. By squaring the equality from the previous hint, we will have one root instead of two.

✓Solution

We proceed by contradiction. Let r=2+3r = \sqrt{2}+\sqrt{3}r=2​+3​ be a rational number. By squaring the equality, we get r2=5+26r^2 = 5 + 2\sqrt{6}r2=5+26​, from which we express 6=r2−52\sqrt{6} = \frac{r^2-5}{2}6​=2r2−5​. Since rrr is rational, the right side is also rational. This would mean that 6\sqrt{6}6​ is a rational number, which is a contradiction (the proof is analogous to that for 2\sqrt{2}2​).

Note. A typically erroneous proof might consist of the argument that the sum of two irrational numbers is always irrational. Convince yourself, however, that this is not true.

The following examples show that proof by contradiction is technically used even when we are proving that something does not hold.

Problem 5

Prove that the sum of three squares of odd integers is never a square of an integer.

1Hint

The key is to look at divisibility by eight.

2Hint

Recall the statement proved in the section on direct proof, that the squares of odd numbers leave a remainder of 1 when divided by 8.

✓Solution

According to the previously proven statement, the square of an odd number leaves a remainder of 1 when divided by 8. The sum of three such numbers therefore leaves a remainder of 3. But then it cannot be a square, since that would have to be odd and, again according to our statement, leave a remainder of 1.

Problem 6

73-CSMO-B-II-1

Patrik chose two distinct positive integers aaa, bbb, wrote each on 10 cards and placed all 20 cards around the circumference of a circle. He noticed that each number is now a divisor of the sum of the two numbers on the adjacent cards. Prove that the numbers on the cards alternate.

1Hint

We are proving that something cannot happen – what would it mean if it potentially could, i.e., if the numbers did not alternate? What is actually the negation of this statement?

2Hint

If the numbers did not alternate, then some two identical numbers are next to each other, e.g. aaaaaa. If we now walk along the circle in some direction, e.g. to the right, we must eventually reach bbb, so we have aabaabaab. What do we get from this?

3Hint

The triple aabaabaab gives us a∣a+ba \mid a+ba∣a+b, so a∣ba \mid ba∣b. It would be great to find something similar somewhere else.

4Hint

To obtain b∣ab \mid ab∣a, we need to find a triple bbabbabba. Why must there also be bbbbbb on the circle? Think about the number of alternating groups: if you merge two aaa's into one group, you reduce the number of available groups for bbb. Where must all the bbb's fit then?

5Hint

If from the triple aabaabaab we find that a∣ba \mid ba∣b, and from the triple bbabbabba we find that b∣ab \mid ab∣a, what conclusion follows for two positive integers a,ba, ba,b?

✓Solution

We prove the claim by contradiction. Suppose that the numbers aaa, bbb are not placed in alternating fashion. This clearly means that there are two adjacent aaa's and simultaneously two adjacent bbb's somewhere on the circle†. Pick two adjacent aaa's. If we start from this pair aaaaaa and travel around the circle in one direction, we will encounter a bbb (otherwise the circle would contain only aaa's). Once this happens, we will have an adjacent triple aabaabaab. According to the problem statement, a∣a+ba \mid a+ba∣a+b holds, from which a∣ba \mid ba∣b. By an analogous argument, we find a triple bbabbabba, from which we get b∣ab \mid ab∣a. For positive integers aaa, bbb we thus have a∣ba \mid ba∣b and b∣ab \mid ab∣a, and therefore a=ba = ba=b, which contradicts the fact that aaa, bbb are distinct. This completes the solution.

Note 1. Without loss of generality, we could have assumed from the start of the proof by contradiction that, say, a<ba < ba<b. Then we would only need the argument about the triple bbabbabba leading to the contradictory conclusion b∣ab \mid ab∣a.

Note 2. Let us additionally show that for numbers aaa, bbb satisfying the problem statement, either b=2ab = 2ab=2a or a=2ba = 2ba=2b must hold. By symmetry, it suffices to prove b=2ab = 2ab=2a in the case a<ba < ba<b. With alternating placement, from the triple abaabaaba we have b∣2ab \mid 2ab∣2a, so 2a=kb2a = kb2a=kb for a suitable positive integer kkk. From the assumption a<ba < ba<b, however, kb=2a<2bkb = 2a < 2bkb=2a<2b follows, from which k<2k < 2k<2, i.e., k=1k = 1k=1, and therefore 2a=kb=b2a = kb = b2a=kb=b, as we wanted to prove.

Finally, we will show perhaps the most famous proof of this widely known fact, which Euclid† was already able to prove.

Theorem 2

Prove that there are infinitely many prime numbers.

Proof

We proceed by contradiction. Assume that there are finitely many prime numbers p1,p2,…,pnp_1, p_2, \dots, p_np1​,p2​,…,pn​. Consider the number N=p1⋅p2⋯pn+1N = p_1 \cdot p_2 \cdots p_n + 1N=p1​⋅p2​⋯pn​+1. This number is greater than 1, so it must have at least one prime divisor ppp. This divisor ppp must be one of our prime numbers p1,…,pnp_1, \dots, p_np1​,…,pn​. At the same time, however, NNN leaves a remainder of 1 when divided by any pip_ipi​, so no pip_ipi​ divides it. This is a contradiction, so there must be infinitely many prime numbers.

Try to solve the next two problems in a similar way:

Problem 7*

Prove that there are infinitely many prime numbers ppp that divide n2+1n^2+1n2+1 for a suitable natural nnn.

1Hint

We go by contradiction. If there were finitely many of them, denote them p1,p2,…,pkp_1,p_2,\dots,p_kp1​,p2​,…,pk​. Try to construct a suitable expression.

2Hint

Think about the expression (p1⋅p2⋯pk)2+1(p_1\cdot p_2 \cdots p_k)^2+1(p1​⋅p2​⋯pk​)2+1.

✓Solution

Assume that there are finitely many such prime numbers, denote them p1,p2,…,pkp_1, p_2, \dots, p_kp1​,p2​,…,pk​. Consider the number

N=(p1⋅p2⋯pk)2+1.N = (p_1 \cdot p_2 \cdots p_k)^2 + 1.N=(p1​⋅p2​⋯pk​)2+1.

This number is greater than 1, therefore it has some prime divisor qqq. Since qqq divides NNN, it divides a number of the form n2+1n^2+1n2+1, so qqq must belong to our list p1,…,pkp_1, \dots, p_kp1​,…,pk​. But this means that qqq divides the product p1⋯pkp_1 \cdots p_kp1​⋯pk​, and thus also divides its square. From this, it follows that qqq divides the difference N−(p1⋯pk)2=1N - (p_1 \cdots p_k)^2 = 1N−(p1​⋯pk​)2=1, which is a contradiction.

Problem 8**

Prove that there are infinitely many prime numbers of the form 3n+23n+23n+2, where nnn is a natural number.

1Hint

We proceed as in the previous cases, we label the primes, we construct a suitable expression. However, one must pay attention to the special prime number 2 (which is also of our form).

2Hint

Think about the expression 3p1⋯pk+23p_1\cdots p_k+23p1​⋯pk​+2, where p1,…,pkp_1,\dots,p_kp1​,…,pk​ are odd prime numbers of the form 3n+23n+23n+2.

3Hint

The key is to find some other prime number of the form 3n+23n+23n+2 in the prime factorization of our expression. Could there be none in this factorization, and what would that mean?

✓Solution

Assume that there are finitely many prime numbers of the form 3n+23n+23n+2. Let p1,…,pkp_1, \dots, p_kp1​,…,pk​ denote all odd prime numbers of this form (we omit the number 2). Consider the number

N=3p1⋯pk+2.N = 3p_1 \cdots p_k + 2.N=3p1​⋯pk​+2.

Since pip_ipi​ are odd, NNN is the sum of an odd number and the number 2, so NNN is odd and is not divisible by 2. At the same time, NNN leaves a remainder of 2 when divided by three. Therefore, NNN must have at least one prime divisor qqq of the form 3n+23n+23n+2 (if all divisors were of the form 3n+13n+13n+1, NNN would also have this form). Since NNN is odd, q≠2q \neq 2q=2. At the same time, qqq cannot be any of the pip_ipi​, because otherwise it would divide NNN as well as 3p1⋯pk3p_1 \cdots p_k3p1​⋯pk​, and thus also their difference 2. We have thus found a new prime number qqq of the form 3n+23n+23n+2, which is a contradiction.

At the end of the section, let's return to the promised explanation of the proof by contrapositive. In general, this is a proof of the implication A⇒BA \Rightarrow BA⇒B, which is equivalent to the implication B′⇒A′B' \Rightarrow A'B′⇒A′, for example, the implication if 555 does not divide nnn, then 252525 does not divide nnn either is equivalent to the implication if 252525 divides nnn, then 555 divides nnn. We are therefore trying to prove the negation of assumption AAA from the negation of statement BBB – technically, we are trying to come to a specific contradiction from the assumption that BBB does not hold, namely with assumption AAA. From this, it can be seen that such a proof is actually a special case of proof by contradiction – in which our goal is to come to a contradiction with any statement, not necessarily an assumption.

3What we have learned

  • We use direct proof when we try to derive as many things as possible from the assumptions.
  • Proof by contradiction is useful when something can be derived from the negation of the statement to be proved; from the negation we then use direct derivation.
  • Proof by contrapositive is actually a special case of proof by contradiction.

4What next

In the next materials, we will focus on specific proof techniques, starting with mathematical induction, which is so important that it deserves a separate material.

Comments

Obsah

  • 1Introduction
  • 2Basic Types of Proofs
  • 2.1Direct Proof
  • 2.2Proof by Contradiction
  • 3What we have learned
  • 4What next
  • Comments
MathComps LogoMathComps

The long-term vision of the project is to create a platform for beginners and advanced solvers of mathematical competitions, their tutors, and all supporters.

Navigation

  • Problems
  • Handouts
  • Guide

Project

  • About
  • Sponsors

© 2026 MathComps•Patrik Bak•Privacy and terms

MathComps LogoMathComps
ProblemsHandoutsGuideNews
Sign in