Santa Claus decorates his Christmas tree with a decoration which has a shape of a regular $12$-sided polygon. Let the $12$-sided polygon be $A_1A_2A_3...A_{12}$. Suppose $I_1$, $I_2$ and $I_3$ are the incentres of $\vartriangle A_1A_2A_5$, $\vartriangle A_5A_7A_8$ and $\vartriangle A_8A_{11}A_1$ respectively. Prove that $I_1A_8$, $I_2A_1$ and $I_3A_5$ are concurrent.
2021 IGMO Christmas Edition
Day 1
Santa has almost finished decorating his giant gingerbread house for Christmas. The only thing left to do is to create a circular fence around it. For this purpose Santa wants to use $n \ge 2$ candy canes in $3$ colors: Green, Red and White, but he doesn't want any two adjacent candy canes to have the same color. Find the number of possible arrangements of this fence in terms of $n$. Note : Single candy canes are distinguishable.
For $n \ge 2$, let $a_1, a_2,... a_n$ be reals such that $a_1 + a_2 + ...+ a_n = n^n - 1$. Show that $$a^2_1+\frac{a^2_2}{1 + a^2_1}+ ... +\frac{a^2_n}{1 + a^2_1+ a^2_2+ ...+ a^2_{n-1}} > n \left( \frac{n^2}{\sqrt[n]{n + 1}}- 1\right)$$
Day 2
Let $f$ and $g$ be real-valued functions defined for all real numbers $x$ and $a$, and $s$, $m$ be some positive constants, such that $f$, $g$ satisfy the equations 1. $f(x + a) + f(x - a) = \frac{2f(x)g(a)}{s}$ 2. $|f(x)|\le m$ for all $x$, $a$. Prove that if $|f|$ is not identically zero, and attains a maximum value, then $|g(a)| \le s$ for all $a$.
There are some (at least $3$) elves in Santa's backyard. The backyard has a circular shape with diameter $d$. Santa finds that any three elves can be surrounded by an $\ell \times d$ rectangle. Prove that all the elves can be surrounded by a $2\ell \times d$ rectangle. Note: An elf being "surrounded" by a rectangle means that the point corresponding to the elf is contained within the rectangle, or is on its perimeter. The elves have no areas, they are points.
For Christmas, Santa gifts us a special machine. This special machine takes as input any relatively prime positive integers $a$, $n$ and returns the order of $a$ modulo$ n$ as the output, that is to say : returns the least positive integer $b$ such that $a^b \equiv 1$ mod $n$. Using this special machine, devise an algorithm of time complexity at most $O(\log (n))$ to factorize natural numbers $n$ of the form $pq$, where $p$, $q$ are safe primes (which means $p$, $q$, $\frac{p-1}{2}$ , $\frac{q-1}{2}$ are all primes greater than $5$). Note : You should assume that calling the special machine is $O(1)$, and for two positve integers $a$ and $b$, calculating gcd$(a, b)$ is $O(\log (\ max (a, b))$.