Find all the prime numbers $p, q$ and $r$ such that $p^2 + 1 = 74 (q^2 + r^2)$.
2019 Peru EGMO TST
Day 1
Let $\Gamma$ be the circle of an acute triangle $ABC$ and let $H$ be its orthocenter. The circle $\omega$ with diameter $AH$ cuts $\Gamma$ at point $D$ ($D\ne A$). Let $M$ be the midpoint of the smaller arc $BC$ of $\Gamma$ . Let $N$ be the midpoint of the largest arc $BC$ of the circumcircle of the triangle $BHC$. Prove that there is a circle that passes through the points $D, H, M$ and $N$.
For a finite set $A$ of integers, define $s(A)$ as the number of values obtained by adding any two elements of $A$, not necessarily different. Analogously, define $r (A)$ as the number of values obtained by subtracting any two elements of $A$, not necessarily different. For example, if $A = \{3,1,-1\}$ $\bullet$ The values obtained by adding any two elements of $A$ are $\{6,4,2,0,-2\}$ and so $s (A) = 5$. $\bullet$ The values obtained by subtracting any two elements of $A$ are $\{4,2,0,-2,-4\}$ and as $r (A) = 5$. Prove that for each positive integer $n$ there is a finite set $A$ of integers such that $r (A) \ge n s (A)$.
Day 2
Consider the numbers from $1$ to $32$. A game is made by placing all the numbers in pairs and replacing each pair with the largest prime divisor of the sum of the numbers of that couple. For example, if we match the $32$ numbers as: $(1, 2), (3,4),(5, 6), (7, 8),..., (27, 28),(29, 30), (31,32)$, we get the following list of $16$ numbers: $3,7,11,5,...,11,59,7$. where there are repetitions. The game continues in a similar way until in the end only one number remains. Determine the highest possible value from the number that remains at the end.
Define the sequence sequence $a_0,a_1, a_2,....,a_{2018}, a_{2019}$ of real numbers as follows: $\bullet$ $a_0 = 1$. $\bullet$ $a_{n + 1} = a_n - \frac{a_n^2}{2019}$ for $n = 0, 1, ...,2018$. Prove that $a_{2019} < \frac12 <a_{2018}$.
Let $ABC$ be a triangle with $AB=AC$, and let $M$ be the midpoint of $BC$. Let $P$ be a point such that $PB<PC$ and $PA$ is parallel to $BC$. Let $X$ and $Y$ be points on the lines $PB$ and $PC$, respectively, so that $B$ lies on the segment $PX$, $C$ lies on the segment $PY$, and $\angle PXM=\angle PYM$. Prove that the quadrilateral $APXY$ is cyclic.