# Baltic Way 1997 ## Copenhagen, November 9, 1997 ## Problems 1. Determine all functions $f$ from the real numbers to the real numbers, different from the zero function, such that $f(x) f(y)=f(x-y)$ for all real numbers $x$ and $y$. 2. Given a sequence $a_{1}, a_{2}, a_{3}, \ldots$ of positive integers in which every positive integer occurs exactly once. Prove that there exist integers $\ell$ and $m$, $1<\ell1$. 19. In a forest each of $n$ animals $(n \geqslant 3)$ lives in its own cave, and there is exactly one separate path between any two of these caves. Before the election for King of the Forest some of the animals make an election campaign. Each campaign-making animal visits each of the other caves exactly once, uses only the paths for moving from cave to cave, never turns from one path to another between the caves and returns to its own cave in the end of its campaign. It is also known that no path between two caves is used by more than one campaign-making animal. a) Prove that for any prime $n$, the maximum possible number of campaign-making animals is $\frac{n-1}{2}$; b) Find the maximum number of campaign-making animals for $n=9$. 20. Twelve cards lie in a row. The cards are of three kinds: with both sides white, both sides black, or with a white and a black side. Initially, nine of the twelve cards have a black side up. The cards 1-6 are turned, and subsequently four of the twelve cards have a black side up. Now cards $4-9$ are turned, and six cards have a black side up. Finally, the cards 1-3 and 10-12 are turned, after which five cards have a black side up. How many cards of each kind are there? ## Solutions 1. Answer: $f(x) \equiv 1$ is the only such function. Since $f$ is not the zero function, there is an $x_{0}$ such that $f\left(x_{0}\right) \neq 0$. From $f\left(x_{0}\right) f(0)=f\left(x_{0}-0\right)=f\left(x_{0}\right)$ we then get $f(0)=1$. Then by $f(x)^{2}=f(x) f(x)=f(x-x)=f(0)$ we have $f(x) \neq 0$ for any real $x$. Finally from $f(x) f\left(\frac{x}{2}\right)=f\left(x-\frac{x}{2}\right)=f\left(\frac{x}{2}\right)$ we get $f(x)=1$ for any real $x$. It is readily verified that this function satisfies the equation. 2. Let $\ell$ be the least index such that $a_{\ell}>a_{1}$. Since $2 a_{\ell}-a_{1}$ is a positive integer larger than $a_{1}$, it occurs in the given sequence beyond $a_{\ell}$. In other words, there exists an index $m>\ell$ such that $a_{m}=2 a_{\ell}-a_{1}$. This completes the proof. Remarks. The problem was proposed in the slightly more general form where the first term of the arithmetic progression has an arbitary index. The remarks below refer to this version. The problem committee felt that no essential new aspects would arise from the generalization. 1. A generalization of this problem is to ask about an existence of an $s$-term arithmetic subsequence of the sequence $\left(a_{n}\right)$ (such a subsequence always exists for $s=3$, as shown above). It turns out that for $s=5$ such a subsequence may not exist. The proof can be found in [1]. The same problem for $s=4$ is still open! 2. The present problem $(s=3)$ and the above solution is also taken from [1]. Reference. [1] J. A. Davis, R. C. Entringer, R. L. Graham and G. J. Simmons, On permutations containing no long arithmetic progressions, Acta Arithmetica 1(1977), pp. 81-90. 3. Answer: $x_{1997}=23913$. Note that if $x_{n}=a n+b$ with $0 \leqslant ba$. Then, if $u_{n}$ is even we have $u_{n+1}=\frac{1}{2} u_{n}m$ satisfies $u_{n} \leqslant a$, and there must be an infinite set of such integers $n$. Since the set of natural numbers not exceeding $a$ is finite and such values arise in the sequence $\left(u_{n}\right)$ an infinite number of times, there exist nonnegative integers $m$ and $n$ with $n>m$ such that $u_{n}=u_{m}$. Starting from $u_{m}$ the sequence is then periodic with a period dividing $n-m$. ![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-06.jpg?height=541&width=485&top_left_y=619&top_left_x=272) Figure 1 6. Answer: $(10,10,10)$ is the only such triple. The equality immediately implies $a^{3}+9 b^{2}+9 c=1990 \equiv 1(\bmod 9)$. Hence $a^{3} \equiv 1(\bmod 9)$ and $a \equiv 1(\bmod 3)$. Since $13^{3}=2197>1990$ then the possible values for $a$ are $1,4,7,10$. On the other hand, if $a \leqslant 7$ then by $a \geqslant b \geqslant c$ we have $$ a^{3}+9 b^{2}+9 c^{2} \leqslant 7^{3}+9 \cdot 7^{2}+9 \cdot 7=847<1990 $$ a contradiction. Hence $a=10$ and $9 b^{2}+9 c=990$, whence by $c \leqslant b \leqslant 10$ we have $c=b=10$. 7. Suppose $b$ is an integer such that $Q(P(b))=1$. Since $a$ and $a+1997$ are roots of $P$ we have $P(x)=(x-a)(x-a-1997) R(x)$ where $R$ is a polynomial with integer coefficients. For any integer $b$ the integers $b-a$ and $b-a-1997$ are of different parity and hence $P(b)=(b-a)(b-a-1997) R(b)$ is even. Since $Q(1998)=2000$ then the constant term in the expansion of $Q(x)$ is even (otherwise $Q(x)$ would be odd for any even integer $x$ ), and $Q(c)$ is even for any even integer $c$. Hence $Q(P(b))$ is also even and cannot be equal to 1 . 8. Answer: yes. The key to the proof is noting that if we add two positive integers and the result is an integer consisting only of digits 9 then the process of addition must have gone without any carries. Therefore it is enough to prove that there exists an integer $k$ such that $3993 k$ is of the form $999 \ldots 9$. Consider the first 3994 positive integers consisting only of digits 9: $$ 9,99,999, \ldots, \underbrace{999 \ldots 9}_{3994} . $$ By the pigeonhole principle some two of these give the same remainder upon division by 3993 , so their difference $$ \underbrace{99 \ldots 9}_{n} \underbrace{00 \ldots 0}_{r}=\underbrace{99 \ldots 9}_{n} \cdot 10^{r} $$ is divisible by 3993 . Since 10 and 3993 are coprime we get an integer consisting only of digits 9 and divisible by 3993 . ## Remarks. 1. The existence of an integer $10^{\ell}-1$ consisting only of digits 9 and divisible by 3993 may also be demonstrated quite elegantly by means of Euler's Theorem. The numbers 10 and 3993 are coprime, so $10^{\varphi(3993)}-1$ is divisible by 3993 . Thus we may take $\ell=\varphi(3993)$. 2 . By a computer search it can be found that the smallest integer $k$ satisfying the condition of the problem is $k=162$. Then $1996 \cdot 162=323352$; $1997 \cdot 162=323514$ and $$ \begin{array}{r} 323352 \\ +323514 \\ \hline 646866 \end{array} $$ 9. Answer: yes. For any two given worlds, Gandalf can move between them either in both directions or none. Hence, it suffices to show that Gandalf can move to the world 1 from any given world $n$. For that, it is sufficient for him to be able to move from any world $n>1$ to some world $m$ such that $m1$. If any number $b$ with $0