# The $4^{\text {th }}$ Romanian Master of Mathematics Competition - Solutions Day 1: Friday, February 25, 2011, Bucharest Problem 1. Prove that there exist two functions $$ f, g: \mathbb{R} \rightarrow \mathbb{R} $$ such that $f \circ g$ is strictly decreasing, while $g \circ f$ is strictly increasing. (Poland) Andrzej KomisArsKi \& Marcin Kuczma ## Solution. Let $$ \begin{aligned} & \cdot A=\bigcup_{k \in \mathbb{Z}}\left(\left[-2^{2 k+1},-2^{2 k}\right) \bigcup\left(2^{2 k}, 2^{2 k+1}\right]\right) \\ & \cdot B=\bigcup_{k \in \mathbb{Z}}\left(\left[-2^{2 k},-2^{2 k-1}\right) \bigcup\left(2^{2 k-1}, 2^{2 k}\right]\right) \end{aligned} $$ Thus $A=2 B, B=2 A, A=-A, B=-B, A \cap B=\varnothing$, and finally $A \cup B \cup\{0\}=\mathbb{R}$. Let us take $$ f(x)=\left\{\begin{array}{lll} x & \text { for } & x \in A \\ -x & \text { for } & x \in B \\ 0 & \text { for } & x=0 \end{array}\right. $$ Take $g(x)=2 f(x)$. Thus $f(g(x))=f(2 f(x))=-2 x$ and $g(f(x))=2 f(f(x))=2 x$. Problem 2. Determine all positive integers $n$ for which there exists a polynomial $f(x)$ with real coefficients, with the following properties: (1) for each integer $k$, the number $f(k)$ is an integer if and only if $k$ is not divisible by $n$; (2) the degree of $f$ is less than $n$. (Hungary) GÉza Kós Solution. We will show that such polynomial exists if and only if $n=1$ or $n$ is a power of a prime. We will use two known facts stated in Lemmata 1 and 2. Lemma 1. If $p^{a}$ is a power of a prime and $k$ is an integer, then $\frac{(k-1)(k-2) \ldots\left(k-p^{a}+1\right)}{\left(p^{a}-1\right)!}$ is divisible by $p$ if and only if $k$ is not divisible by $p^{a}$. Proof. First suppose that $p^{a} \mid k$ and consider $$ \frac{(k-1)(k-2) \cdots\left(k-p^{a}+1\right)}{\left(p^{a}-1\right)!}=\frac{k-1}{p^{a}-1} \cdot \frac{k-2}{p^{a}-2} \cdots \frac{k-p^{a}+1}{1} $$ In every fraction on the right-hand side, $p$ has the same maximal exponent in the numerator as in the denominator. Therefore, the product (which is an integer) is not divisible by $p$. Now suppose that $p^{a} \nmid k$. We have $$ \frac{(k-1)(k-2) \cdots\left(k-p^{a}+1\right)}{\left(p^{a}-1\right)!}=\frac{p^{a}}{k} \cdot \frac{k(k-1) \cdots\left(k-p^{a}+1\right)}{\left(p^{a}\right)!} . $$ The last fraction is an integer. In the fraction $\frac{p^{a}}{k}$, the denominator $k$ is not divisible by $p^{a}$. Lemma 2. If $g(x)$ is a polynomial with degree less than $n$ then $$ \sum_{\ell=0}^{n}(-1)^{\ell}\binom{n}{\ell} g(x+n-\ell)=0 $$ Proof. Apply induction on $n$. For $n=1$ then $g(x)$ is a constant and $$ \binom{1}{0} g(x+1)-\binom{1}{1} g(x)=g(x+1)-g(x)=0 $$ Now assume that $n>1$ and the Lemma holds for $n-1$. Let $h(x)=g(x+1)-g(x)$; the degree of $h$ is less than the degree of $g$, so the induction hypothesis applies for $g$ and $n-1$ : $$ \begin{gathered} \sum_{\ell=0}^{n-1}(-1)^{\ell}\binom{n-1}{\ell} h(x+n-1-\ell)=0 \\ \sum_{\ell=0}^{n-1}(-1)^{\ell}\binom{n-1}{\ell}(g(x+n-\ell)-g(x+n-1-\ell))=0 \\ \binom{n-1}{0} g(x+n)+\sum_{\ell=1}^{n-1}(-1)^{\ell}\left(\binom{n-1}{\ell-1}+\right. \\ \left.\binom{n-1}{\ell}\right) g(x+n-\ell)-(-1)^{n-1}\binom{n-1}{n-1} g(x)=0 \\ \sum_{\ell=0}^{n}(-1)^{\ell}\binom{n}{\ell} g(x+n-\ell)=0 \end{gathered} $$ Lemma 3. If $n$ has at least two distinct prime divisors then the greatest common divisor of $\binom{n}{1},\binom{n}{2}, \ldots,\binom{n}{n-1}$ is 1 . Proof. Suppose to the contrary that $p$ is a common prime divisor of $\binom{n}{1}, \ldots,\binom{n}{n-1}$. In particular, $p \left\lvert\,\binom{ n}{1}=n\right.$. Let $a$ be the exponent of $p$ in the prime factorization of $n$. Since $n$ has at least two prime divisors, we have $1