Find all pairs of positive integers $(x, y)$ such that: $7^{x}-3 \cdot 2^{y}=1$.

## - Solutions -
This is a Diophantine equation, that is, an equation to be solved in integers. Some of these Diophantine equations are among the most difficult problems in mathematics.

Let's write the equation: $7^{x}-1=3 \cdot 2^{y}$. We cannot have $x=0$ because the right-hand side cannot be zero. For $x \geqslant 1$, the left-hand side is divisible by $7-1=6$. More precisely, after simplification by $7-1$, we find: $7^{x-1}+7^{x-2}+\cdots+7+1=2^{y-1}$. We see there an obvious first solution: $x=1, y=1$. For $x>1$, the left-hand side contains $x$ terms all odd, and the right-hand side is a power of 2 other than 1. Therefore, $x$ must be even, so that the sum on the left is even. We can therefore group the terms two by two and factor $(7+1)$ on the left: $(7+1)\left(7^{x-2}+7^{x-4}+\cdots+49+1\right)=8 \cdot 2^{y-4}$. Hence a second obvious solution: $x=2, y=4$. For $x>2$, after simplification by 8, the left-hand side contains a sum of $\frac{x}{2}$ terms, all odd, distinct from 1 and equal to a power of 2, so even, which implies that $\frac{x}{2}$ must be even, and we can factor $7^{2}+1=50$ on the left: $\left(7^{2}+1\right)\left(7^{x-4}+7^{x-8}+\cdots+1\right)=2^{y-4}$. But 50 cannot divide a power of 2, so there is no root for $x>2$. The only solution pairs are therefore: $(1,1)$ and $(2,4)$.

## 4 Inequalities

## - Rearrangement -

This inequality, very useful, is relatively intuitive: it is by multiplying the largest together and then the smallest together before summing the products that one gets the largest result.

Theorem 3.6. Let $a_{1} \leqslant \cdots \leqslant a_{n}$ and $b_{1} \leqslant \cdots \leqslant b_{n}$ be sequences of real numbers, and $\sigma$ a permutation of $\{1, \cdots, n\}$. Then the sum

$$
S(\sigma)=\sum_{i=1}^{n} a_{i} b_{\sigma(i)}
$$

is maximal when $\sigma$ is the identity, and minimal when for all $i, \sigma(i)=n+1-i$. That is, if one wants the largest possible sum, one must arrange the two sequences in the same order, and in reverse order if one wants the opposite.

Proof. There is a finite number of permutations, so there is one for which $S$ will be maximal. If for a certain pair $(i, j)$ we have $i\sigma(j)$, then let $\sigma^{\prime}$ be the permutation which is identical to $\sigma$ on $\{1, \cdots, n\}$ and which sends $i$ to $\sigma(j)$ and vice versa. It is clear that

$$
\left(a_{i}-a_{j}\right)\left(b_{\sigma(i)}-b_{\sigma(\mathfrak{j})}\right) \leqslant 0
$$

so that

$$
a_{i} b_{\sigma(i)}+a_{j} b_{\sigma(j)} \leqslant a_{i} b_{\sigma^{\prime}(i)}+a_{j} b_{\sigma^{\prime}(j)}
$$

Then $S(\sigma) \leqslant S\left(\sigma^{\prime}\right)$. We conclude that $S(\sigma)$ will be maximal for $\sigma$ the identity. The reasoning to find the minimum of $S$ is of course similar.

This allows us to prove a very useful inequality:

## Theorem 3.7. Chebyshev's Inequality

With the previous notations,

$$
a_{1} b_{1}+\cdots+a_{n} b_{n} \geqslant \frac{\left(a_{1}+\cdots+a_{n}\right)\left(b_{1}+\cdots+b_{n}\right)}{n}
$$

Indeed, for all $i$:

$$
a_{1} b_{1}+a_{2} b_{2}+\cdots+a_{n} b_{n} \geqslant a_{1+i} b_{1}+a_{2+i} b_{2}+\cdots+a_{i} b_{n}
$$

by the rearrangement inequality. It then suffices to sum the $n$ inequalities obtained to have the result.

Some examples of application are welcome.

Example 3.8. Let $x_{1} \leqslant \cdots \leqslant x_{n}$ and $y_{1} \leqslant \cdots \leqslant y_{n}$ be real numbers, and $z_{1}, \cdots, z_{n}$ any permutation of the $y_{i}$, show that

$$
\sum_{i=1}^{n}\left(x_{i}-y_{i}\right)^{2} \leqslant \sum_{i=1}^{n}\left(x_{i}-z_{i}\right)^{2}
$$

Example 3.9. Show that for all positive real numbers $a, b, c$,

$$
a^{3}+b^{3}+c^{3} \geqslant 3 a b c
$$

We can generalize...

## - Cauchy-Schwarz -

Theorem 3.10. Let $a_{1}, \cdots, a_{n}$ and $b_{1}, \cdots, b_{n}$ be real numbers, we have

$$
\left(a_{1} b_{1}+\cdots+a_{n} b_{n}\right)^{2} \leqslant\left(a_{1}^{2}+\cdots+a_{n}^{2}\right)\left(b_{1}^{2}+\cdots+b_{n}^{2}\right)
$$

with equality if and only if the sequences are "proportional" ( $a_{i} / b_{i}$ is constant).

Proof. We evaluate the discriminant of the quadratic polynomial

$$
p(x)=\left(a_{1} x+b_{1}\right)^{2}+\cdots+\left(a_{n} x+b_{n}\right)^{2}
$$

which is positive on $\mathbb{R}$ and therefore has at most one root.

This inequality is very often of great help, much more than one might imagine:

Axiom 1. Any inequality problem in Olympiads admitting at least three different solutions has a solution where Cauchy-Schwarz plays an important role.

Example 3.11. Show the inequality between the arithmetic mean and the quadratic mean: for $n \in \mathbb{N}^{*}$, if $a_{1}, \cdots, a_{n} \in \mathbb{R}^{+}$,

$$
\frac{a_{1}+\cdots+a_{n}}{n} \leqslant \sqrt{\frac{a_{1}^{2}+\cdots+a_{n}^{2}}{n}}
$$

Example 3.12. Show the inequality between the arithmetic mean and the harmonic mean: for $n \in \mathbb{N}^{*}$, if $a_{1}, \cdots, a_{n} \in \mathbb{R}^{+}$,

$$
\frac{n}{\frac{1}{a_{1}}+\cdots \frac{1}{a_{n}}} \leqslant \frac{a_{1}+\cdots+a_{n}}{n}
$$

Example 3.13. Let $a_{1}, \cdots, a_{n}$ be positive real numbers with sum 1. Find the minimum of $a_{1}^{2}+$ $\cdots+a_{n}^{2}$.

Remark 3.14. One should not hesitate to look for particular cases, for example when all the $a_{i}$ are equal.

## - Exercises -