Leticia has a $9\times 9$ board. She says that two squares are friends is they share a side, if they are at opposite ends of the same row or if they are at opposite ends of the same column. Every square has $4$ friends on the board. Leticia will paint every square one of three colors: green, blue or red. In each square a number will be written based on the following rules: - If the square is green, write the number of red friends plus twice the number of blue friends. - If the square is red, write the number of blue friends plus twice the number of green friends. - If the square is blue, write the number of green friends plus twice the number of red friends. Considering that Leticia can choose the coloring of the squares on the board, find the maximum possible value she can obtain when she sums the numbers in all the squares.
2022 Pan-American Girls' Math Olympiad
Find all ordered triplets $(p,q,r)$ of positive integers such that $p$ and $q$ are two (not necessarily distinct) primes, $r$ is even, and \[p^3+q^2=4r^2+45r+103.\]
Let $ABC$ be an acute triangle with $AB< AC$. Denote by $P$ and $Q$ points on the segment $BC$ such that $\angle BAP = \angle CAQ < \frac{\angle BAC}{2}$. $B_1$ is a point on segment $AC$. $BB_1$ intersects $AP$ and $AQ$ at $P_1$ and $Q_1$, respectively. The angle bisectors of $\angle BAC$ and $\angle CBB_1$ intersect at $M$. If $PQ_1\perp AC$ and $QP_1\perp AB$, prove that $AQ_1MPB$ is cyclic.
Let $ABC$ be a triangle, with $AB\neq AC$. Let $O_1$ and $O_2$ denote the centers of circles $\omega_1$ and $\omega_2$ with diameters $AB$ and $BC$, respectively. A point $P$ on segment $BC$ is chosen such that $AP$ intersects $\omega_1$ in point $Q$, with $Q\neq A$. Prove that $O_1$, $O_2$, and $Q$ are collinear if and only if $AP$ is the angle bisector of $\angle BAC$.
Find all positive integers $k$ for which there exist $a$, $b$, and $c$ positive integers such that \[\lvert (a-b)^3+(b-c)^3+(c-a)^3\rvert=3\cdot2^k.\]
Ana and Bety play a game alternating turns. Initially, Ana chooses an odd possitive integer and composite $n$ such that $2^j<n<2^{j+1}$ with $2<j$. In her first turn Bety chooses an odd composite integer $n_1$ such that \[n_1\leq \frac{1^n+2^n+\dots+(n-1)^n}{2(n-1)^{n-1}}.\]Then, on her other turn, Ana chooses a prime number $p_1$ that divides $n_1$. If the prime that Ana chooses is $3$, $5$ or $7$, the Ana wins; otherwise Bety chooses an odd composite positive integer $n_2$ such that \[n_2\leq \frac{1^{p_1}+2^{p_1}+\dots+(p_1-1)^{p_1}}{2(p_1-1)^{p_1-1}}.\]After that, on her turn, Ana chooses a prime $p_2$ that divides $n_2,$, if $p_2$ is $3$, $5$, or $7$, Ana wins, otherwise the process repeats. Also, Ana wins if at any time Bety cannot choose an odd composite positive integer in the corresponding range. Bety wins if she manages to play at least $j-1$ turns. Find which of the two players has a winning strategy.