(i) Find all prime numbers $p$ such that $\frac{7^{p-1}-1}{p}$ is a perfect square.

(ii) Find all prime numbers $p$ such that $\frac{11^{p-1}-1}{p}$ is a perfect square.

## Solutions

We denote $a \wedge b$ as the GCD of $a$ and $b$.
Let's start with a few remarks. First, it is clear that $p>2$ in both cases. Next, if $q^{p-1}-1=p n^{2}$ with $q$ odd and $p$ prime, then, denoting $p^{\prime}=\frac{p-1}{2}$,

$$
q^{p-1}-1=\left(q^{p^{\prime}}-1\right)\left(q^{p^{\prime}}+1\right)=p n^{2}.
$$

Since $\left(q^{p^{\prime}-1}-1-1\right) \wedge\left(q^{p^{\prime}}+1\right)=2$, one of the following two cases must occur:
(a) $q^{p^{\prime}}-1=2 p a^{2}$ and $q^{p^{\prime}}+1=2 b^{2}$,

(b) $q^{p^{\prime}}-1=2 a^{2}$ and $q^{p^{\prime}}+1=2 p b^{2}$.

(i) Here $q=7$. In case (b), we would have $-1 \equiv 2 a^{2} \equiv(3 a)^{2} \bmod 7$, which is not possible because -1 is not a square modulo 7. In case (a), 6 divides $7^{p^{\prime}}-1=2 p a^{2}$, so 3 divides $p a^{2}$. We check that $p=3$ gives a solution. If $p \neq 3$, then 3 divides $a^{2}$ and thus 9 divides $7^{p^{\prime}}-1$. Since the order of 7 modulo 9 is 3, we deduce that 3 divides $p^{\prime}$. Writing $p^{\prime}=3 k$, we get

$$
2 a^{2}=\left(7^{k}+1\right)\left(7^{2 k}-7^{k}+1\right)
$$

Since $7^{2 k}-7^{k}+1$ is odd and coprime with $7^{k}+1$, it is a perfect square. This is absurd because

$$
\left(7^{k}-1\right)^{2}<7^{2 k}-7^{k}+1<\left(7^{k}\right)^{2}
$$

Thus, $p=3$ is the only solution.

(ii) Here $q=11$. In case (a), we would have $1 \equiv 2 b^{2} \bmod 11$, which is not possible because 2 is not a square modulo 11. In case (b), we have $11^{p^{\prime}}+1=2 p b^{2}$, so $11^{p^{\prime}} \equiv -1 \bmod p$. Therefore,

$$
2 a^{2}=11^{p^{\prime}}-1 \equiv -2 \quad \bmod p
$$

Thus, $a^{2} \equiv -1 \bmod p$. Therefore, -1 is a square modulo $p$, and by quadratic reciprocity, $p \equiv 1 \bmod 4$. Writing $p^{\prime}=2 k$, we get

$$
2 a^{2}=11^{2 k}-1=\left(11^{k}-1\right)\left(11^{k}+1\right)
$$

First case. $11^{k}+1=c^{2}$. Then $11^{k}=(c-1)(c+1)$, which is not possible because $c-1$ and $c+1$ must then be powers of 11.

Second case. $11^{k}+1=2 d^{2}$, which is not possible because 2 is not a square modulo 11. Therefore, there are no solutions.

## 4 Thursday afternoon, 18: Thomas Budzinski

## Around the Symmedian

Definition 19. Let $A B C$ be a triangle. The symmedian from $A$ in $A B C$ is the reflection of the median from $A$ with respect to the bisector of $\widehat{B A C}$.

Lemma 20. Let $S$ be the point where the symmedian from $A$ intersects $[B C]$. We have $\frac{S B}{S C}=\left(\frac{A B}{A C}\right)^{2}$.

Proof. We use the law of sines. Let $M$ be the midpoint of $B C$. We have:

$$
\frac{S B}{S C}=\frac{A B \frac{\sin \widehat{S A B}}{\sin \widehat{A S B}}}{A C \frac{\sin \widehat{S A C}}{\sin \widehat{A S C}}}=\frac{A B}{A C} \frac{\sin \widehat{C A M}}{\sin \widehat{B A M}}=\frac{A B}{A C} \frac{\frac{C M}{A C} \sin \widehat{A M C}}{\frac{B M}{A B} \sin \widehat{A M B}}=\left(\frac{A B}{A C}\right)^{2}
$$

Lemma 21. Let $A B C$ be a triangle and $\Gamma$ its circumcircle. The tangents to $\Gamma$ at $B$ and $C$ intersect at $D$. Then $(A D)$ is the symmedian from $A$ in $A B C$.

Proof. We present a trigonometric proof: let $(d)$ be the reflection of $(A D)$ with respect to the bisector of $\widehat{B A C}$: it suffices to show that $(d)$ is the median from $A$. Let $M$ be its intersection with $[B C]$: we want to show that $M$ is the midpoint of $[B C]$. Using the law of sines, we get:

$$
\frac{M B}{M C}=\frac{A M \frac{\sin \widehat{B A M}}{\sin \widehat{A B M}}}{A M \frac{\sin \widehat{C A M}}{\sin \widehat{A C M}}}=\frac{\sin \widehat{A C B}}{\sin \widehat{A B C}} \frac{\sin \widehat{C A D}}{\sin \widehat{B A D}}=\frac{\sin \widehat{A B D}}{\sin \widehat{B A D}} \frac{\sin \widehat{C A D}}{\sin \widehat{A C D}}=\frac{A D}{B D} \frac{C D}{A D}=\frac{C D}{B D}=1
$$

Here is also a synthetic proof: let $\Gamma$ be the circle centered at $D$ passing through $B$ and $C$. It intersects $(A B)$ at $P$ and $(A C)$ at $Q$. We verify by angle chasing that $P, D$ and $Q$ are collinear, so $D$ is the midpoint of $[P Q]$. On the other hand, still by angle chasing, the triangles $A B C$ and $A P Q$ are indirectly similar. The similarity that maps $A P Q$ to $A B C$ maps $D$ to the midpoint $M$ of $[B C]$, so $\widehat{P A D}=\widehat{B A M}$, which allows us to conclude.