Problem 1
A palindrome is a positive integer number that remains the same when its digits are reversed.
(a) How many palindromes of $2023$ digits have at least $2022$ equal digits?
(b) How many palindromes of $2023$ digits have at least $2021$ equal digits?
Solution
Let $n_{2021}$, $n_{2022}$, $n_{2023}$ be the number of palindromes that have exactly $2021$, $2022$ and $2023$ equal digits respectfully. Notice that the number of palindromes that have at least $2022$ equal digits is
\[ n_{2022}+n_{2023} \]
while the number of palindromes that have at least $2021$ equal digit is
\[ n_{2021}+n_{2022}+n_{2023} \]
For $n_{2023}$ all digits of the palindromes are the same and we have $9$ possible palindromes, i.e. $n_{2023}=9$.
For $n_{2022}$ the palindromes will have $2022$ digits $x$ and one digit $y$, where $x \neq y$. Since $2023$ is odd, then the middle digit is $y$, and we have $9 \cdot 9$ possible palindromes, i.e. $n_{2023}=81$.
For $n_{2022}$ the palindromes will only have $2021$ digits $x$, one digit $y$ and one digit $z$, where $x \neq y$ and $x \neq z$. Since $2023$ is odd, then the middle digit cannot be $y$, because then the digit $z$ would not have a symmetric digit $z$. Similarly, the middle digit cannot be $z$. This implies that the digits $y$ and $z$ are on the symmetric positions and $y=z$. From here we have $1011 \cdot 9 \cdot 9$ possible palindromes, i.e. $n_{2023}=81891$.
Therefore, the answer for the part (a) is
\[ n_{2022}+n_{2023} = 81 + 9 = \boxed{ 90 } \]
and the answer for the part (b) is
\[ n_{2021}+n_{2022}+n_{2023} = 81891 + 81 + 9 = \boxed{ 81981} \]
Problem 2
Consider the semicircle with center $M$ and diameter $AB$. Let $P$ be a point on the semicircle different from $A$ and $B$, and let $Q$ be the midpoint of the arc $AP$. The line through $M$ and parallel to $QP$ intersects the line $PB$ are the point $S$. Prove that the triangle $PMS$ is isosceles.
Solution
Let the radius of the semicircle be $R$ and $\angle MPB = 2a$.
Since $MP=MB=R$, then the triangle $MBP$ is isosceles and $\angle MBP = 2a$ and $\angle PMB = 180-4a$.
Since $Q$ is the midpoint of the arc $AP$, then $AQ=PQ$. Since $MA=MQ=MP=R$, then the triangles $AMQ$ and $PMQ$ are congruent by $Side-Side-Side$. From here the angle $\angle AMQ$ and $\angle PMQ$. are congruent. Since the $\angle AMB = 180^{\circ}$ we have $\angle AMQ = \angle PMQ = 2a$.
From the triangle $PQM$ we have $\angle MPQ = 90^{\circ} – a$. Since $QP \parallel MS$, then $\angle PMS = \angle MPQ = 90^{\circ} – a$.
Now from the triangle $PMS$ we have $\angle MSP = 90^{\circ} – a$ and the triangle $PMS$ is isosceles, as desired.
Problem 3
Let $A=\{-1,0,1,2\}$. Given that
\[ \sum_{i=1}^{2023} { a_i } = 19 \]
\[ \sum_{i=1}^{2023} { a_i^2 } = 99 \]
where $a_i \in A$, for $i=1,2,…,2023$. Find the maximum and minimum values of
\[ M = \sum_{i=1}^{2023} { a_i^3 } \]
Solution
Let $a$, $b$, $c$ and $d$ be the number of terms $a_i$ that are equal to $-1$, $0$, $1$ and $2$, respectfully. Notice that $a+b+c+d=2023$. From the equality
\[ \sum_{i=1}^{2023} { a_i } = 19 \]
we have
\[ -a+c+2d = 19 \]
which implies that
\[ -a+c=19-2d \]
From here the expression for $M$ becomes
\[ M = \sum_{i=1}^{2023} { a_i^3 } = -a + c + 8d = 19+6d \]
Let us show that the minimal value of $M$ is $19$. Indeed
\[ M = 19+6d \geq 19+6(0) = 19 \]
and the value $19$ is reached for $a=40$, $b=1924$, $c=59$, $d=0$.
Let us show that the maximal value of $M$ is $133$. Indeed, for $d \geq 20$ we have
\[ a+c = 99 – 4d \leq 99 – 4(20) = 19 \]
while at the same time
\[ a+c \geq c-a = 2d-19 \geq 2(20) – 19 = 21 \]
which is impossible. For $d \leq 19$ we have
\[ M = 19+6d \leq 19+6(19) = 133 \]
and the value $133$ is reached for $a=21$, $b=1981$, $c=2$, $d=19$.
Problem 4
Find all the positive integers $n$ that have at least $4$ distinct divisors and $n$ is equal to the sum of the squares of its $4$ smallest positive divisors.
Solution
Answer: $n = \boxed{130}$.
Let
\[ n=a^2+b^2+c^2+d^2 \] where $a$, $b$, $c$, $d$ are the four smallest divisors of $n$. Start by noticing that $a=1$.
If $n$ is odd, the numbers $b,c,d$ are also odd, and then $a^2+b^2+c^2+d^2$ is even, as we obtained a contradiction.
If $n$ is even, then $b=2$. If $4|n$, then $c=4$ or $d=4$. Since a square of a number is always congruent to $0$ or $1$ mod $4$, then
\[ 0 \equiv n = a^2+b^2+c^2+d^2 = 1 + 4 + 16 + x^2 \equiv 1 + x^2 \pmod{4} \]
which is impossible.
From here $n$ is of the form $4k+2$. This implies that $c$ is an odd prime, and $d=2c$. Therefore, the equation becomes
\[ n=5+5c^2 \]
Notice that the left-hand side of this equation is divisible by $c$. Therefore, the right-hand side should also be divisible by $c$, and therefore $5$ is divisible by $c$. This implies that $c=5$ and $n=130$.