A four-digit positive integer is called virtual if it has the form $\overline{abab}$, where $a$ and $b$ are digits and $a \neq 0$. For example 2020, 2121 and 2222 are virtual numbers, while 2002 and 0202 are not. Find all virtual numbers of the form $n^2+1$, for some positive integer $n$.
2020 Centroamerican and Caribbean Math Olympiad
Day 1
Suppose you have identical coins distributed in several piles with one or more coins in each pile. An action consists of taking two piles, which have an even total of coins among them, and redistribute their coins in two piles so that they end up with the same number of coins. A distribution is levelable if it is possible, by means of 0 or more operations, to end up with all the piles having the same number of coins. Determine all positive integers $n$ such that, for all positive integers $k$, any distribution of $nk$ coins in $n$ piles is levelable.
Find all the functions $f: \mathbb{Z}\to \mathbb{Z}$ satisfying the following property: if $a$, $b$ and $c$ are integers such that $a+b+c=0$, then $$f(a)+f(b)+f(c)=a^2+b^2+c^2.$$
Day 2
Consider a triangle $ABC$ with $BC>AC$. The circle with center $C$ and radius $AC$ intersects the segment $BC$ in $D$. Let $I$ be the incenter of triangle $ABC$ and $\Gamma$ be the circle that passes through $I$ and is tangent to the line $CA$ at $A$. The line $AB$ and $\Gamma$ intersect at a point $F$ with $F \neq A$. Prove that $BF=BD$.
Let $P(x)$ be a polynomial with real non-negative coefficients. Let $k$ be a positive integer and $x_1, x_2, \dots, x_k$ positive real numbers such that $x_1x_2\cdots x_k=1$. Prove that $$P(x_1)+P(x_2)+\cdots+P(x_k)\geq kP(1).$$
A positive integer $N$ is interoceanic if its prime factorization $$N=p_1^{x_1}p_2^{x_2}\cdots p_k^{x_k}$$ satisfies $$x_1+x_2+\dots +x_k=p_1+p_2+\cdots +p_k.$$ Find all interoceanic numbers less than 2020.