Navvye/Olympiad-Problems-CSV huggingface dataset:
2005 Germany Team Selection Test
For an ${n\times n}$ matrix $A$, let $X_{i}$ be the set of entries in row $i$, and $Y_{j}$ the set of entries in column $j$, ${1\leq i,j\leq n}$. We say that $A$ is golden if ${X_{1},\dots ,X_{n},Y_{1},\dots ,Y_{n}}$ are distinct sets. Find the least integer $n$ such that there exists a ${2004\times 2004}$ golden matrix with entries in the set ${\{1,2,\dots ,n\}}$.
2005 Germany Team Selection Test
Let $O$ be the circumcenter of an acute-angled triangle $ABC$ with ${\angle B<\angle C}$. The line $AO$ meets the side $BC$ at $D$. The circumcenters of the triangles $ABD$ and $ACD$ are $E$ and $F$, respectively. Extend the sides $BA$ and $CA$ beyond $A$, and choose on the respective extensions points $G$ and $H$ such that ${AG=AC}$ and ${AH=AB}$. Prove that the quadrilateral $EFGH$ is a rectangle if and only if ${\angle ACB-\angle ABC=60^{\circ }}$.



Proposed by Hojoo Lee, Korea
2005 Germany Team Selection Test
A positive integer is called nice if the sum of its digits in the number system with base $ 3$ is divisible by $ 3$.



Calculate the sum of the first $ 2005$ nice positive integers.
2005 Germany Team Selection Test
Find all monotonically increasing or monotonically decreasing functions $f: \mathbb{R}_+\to\mathbb{R}_+$ which satisfy the equation $f\left(xy\right)\cdot f\left(\frac{f\left(y\right)}{x}\right)=1$ for any two numbers $x$ and $y$ from $\mathbb{R}_+$.



Hereby, $\mathbb{R}_+$ is the set of all positive real numbers.



Note. A function $f: \mathbb{R}_+\to\mathbb{R}_+$ is called monotonically increasing if for any two positive numbers $x$ and $y$ such that $x\geq y$, we have $f\left(x\right)\geq f\left(y\right)$.

A function $f: \mathbb{R}_+\to\mathbb{R}_+$ is called monotonically decreasing if for any two positive numbers $x$ and $y$ such that $x\geq y$, we have $f\left(x\right)\leq f\left(y\right)$.
2005 Germany Team Selection Test
Let $ABC$ be a triangle satisfying $BC < CA$. Let $P$ be an arbitrary point on the side $AB$ (different from $A$ and $B$), and let the line $CP$ meet the circumcircle of triangle $ABC$ at a point $S$ (apart from the point $C$).



Let the circumcircle of triangle $ASP$ meet the line $CA$ at a point $R$ (apart from $A$), and let the circumcircle of triangle $BPS$ meet the line $CB$ at a point $Q$ (apart from $B$).



Prove that the excircle of triangle $APR$ at the side $AP$ is identical with the excircle of triangle $PQB$ at the side $PQ$ if and only if the point $S$ is the midpoint of the arc $AB$ on the circumcircle of triangle $ABC$.
2005 Germany Team Selection Test
Let $b$ and $c$ be any two positive integers. Define an integer sequence $a_n$, for $n\geq 1$, by $a_1=1$, $a_2=1$, $a_3=b$ and $a_{n+3}=ba_{n+2}a_{n+1}+ca_n$.



Find all positive integers $r$ for which there exists a positive integer $n$ such that the number $a_n$ is divisible by $r$.
2005 Germany Team Selection Test
In the following, a word will mean a finite sequence of letters "$a$" and "$b$". The length of a word will mean the number of the letters of the word. For instance, $abaab$ is a word of length $5$. There exists exactly one word of length $0$, namely the empty word.



A word $w$ of length $\ell$ consisting of the letters $x_1$, $x_2$, ..., $x_{\ell}$ in this order is called a palindrome if and only if $x_j=x_{\ell+1-j}$ holds for every $j$ such that $1\leq j\leq\ell$. For instance, $baaab$ is a palindrome; so is the empty word.



For two words $w_1$ and $w_2$, let $w_1w_2$ denote the word formed by writing the word $w_2$ directly after the word $w_1$. For instance, if $w_1=baa$ and $w_2=bb$, then $w_1w_2=baabb$.



Let $r$, $s$, $t$ be nonnegative integers satisfying $r + s = t + 2$. Prove that there exist palindromes $A$, $B$, $C$ with lengths $r$, $s$, $t$, respectively, such that $AB=Cab$, if and only if the integers $r + 2$ and $s - 2$ are coprime.
2005 Germany Team Selection Test
Let n be a positive integer, and let $a_1$, $a_2$, ..., $a_n$, $b_1$, $b_2$, ..., $b_n$ be positive real numbers such that $a_1\geq a_2\geq ...\geq a_n$ and $b_1\geq a_1$, $b_1b_2\geq a_1a_2$, $b_1b_2b_3\geq a_1a_2a_3$, ..., $b_1b_2...b_n\geq a_1a_2...a_n$.



Prove that $b_1+b_2+...+b_n\geq a_1+a_2+...+a_n$.
2005 Germany Team Selection Test
Let $ABC$ be a triangle with area $S$, and let $P$ be a point in the plane. Prove that $AP+BP+CP\geq 2\sqrt[4]{3}\sqrt{S}$.
2005 Germany Team Selection Test
(a) Does there exist a positive integer $n$ such that the decimal representation of $n!$ ends with the string $2004$, followed by a number of digits from the set $\left\{0;\;4\right\}$ ?



(b) Does there exist a positive integer $n$ such that the decimal representation of $n!$ starts with the string $2004$ ?
2005 Germany Team Selection Test
For any positive integer $ n$, prove that there exists a polynomial $ P$ of degree $ n$ such that all coeffients of this polynomial $ P$ are integers, and such that the numbers $ P\left(0\right)$, $ P\left(1\right)$, $ P\left(2\right)$, ..., $ P\left(n\right)$ are pairwisely distinct powers of $ 2$.
2005 Germany Team Selection Test
Let $ABC$ be a triangle with orthocenter $H$, incenter $I$ and centroid $S$, and let $d$ be the diameter of the circumcircle of triangle $ABC$. Prove the inequality

$$9\cdot HS^2+4\left(AH\cdot AI+BH\cdot BI+CH\cdot CI\right)\geq 3d^2,$$

and determine when equality holds.
2005 Germany Team Selection Test
Find the smallest positive integer $n$ with the following property:



For any integer $m$ with $0 < m < 2004$, there exists an integer $k$ such that



$$\frac{m}{2004}<\frac{k}{n}<\frac{m+1}{2005}.$$
2005 Germany Team Selection Test
Let $ n$ be a positive integer such that $ n\geq 3$. Let $ a_1$, $ a_2$, ..., $ a_n$ and $ b_1$, $ b_2$, ..., $ b_n$ be $ 2n$ positive real numbers satisfying the equations

$$ a_1 + a_2 + ... + a_n = 1, \quad \text{and} \quad b_1^2 + b_2^2 + ... + b_n^2 = 1.$$

Prove the inequality

$$a_1\left(b_1 + a_2\right) + a_2\left(b_2 + a_3\right) + ... + a_{n - 1}\left(b_{n - 1} + a_n\right) + a_n\left(b_n + a_1\right) < 1.$$
2005 Germany Team Selection Test
Prove that, among $32$ integer numbers, one can always find $16$ whose sum is divisible by $16$.
2004 Germany Team Selection Test
A function $f$ satisfies the equation

$$f\left(x\right)+f\left(1-\frac{1}{x}\right)=1+x$$

for every real number $x$ except for $x = 0$ and $x = 1$. Find a closed formula for $f$.
2004 Germany Team Selection Test
In a triangle $ABC$, let $D$ be the midpoint of the side $BC$, and let $E$ be a point on the side $AC$. The lines $BE$ and $AD$ meet at a point $F$.



Prove: If $\frac{BF}{FE}=\frac{BC}{AB}+1$, then the line $BE$ bisects the angle $ABC$.
2004 Germany Team Selection Test
Given six real numbers $a$, $b$, $c$, $x$, $y$, $z$ such that $0 < b-c < a < b+c$ and $ax + by + cz = 0$.



What is the sign of the sum $ayz + bzx + cxy$ ?
2004 Germany Team Selection Test
Here is a problem closely related to this, namely Problem 4 of the German pre-TST 2004, written in December 2003:



In the plane, consider $n$ circular disks $K_1$, $K_2$, ..., $K_n$ with equal radius $r$. Assume that each point of the plane is contained in not more than $2003$ of these circular disks. Show that each circular disk $K_i$ intersects not more than $14020$ other circular disks.
2004 Germany Team Selection Test
Let $x_1,\ldots, x_n$ and $y_1,\ldots, y_n$ be real numbers.  Let $A = (a_{ij})_{1\leq i,j\leq n}$ be the matrix with entries $$a_{ij} = \begin{cases}1,&\text{if }x_i + y_j\geq 0;\\0,&\text{if }x_i + y_j < 0.\end{cases}$$Suppose that $B$ is an $n\times n$ matrix with entries $0$, $1$ such that the sum of the elements in each row and each column of $B$ is equal to the corresponding sum for the matrix $A$.  Prove that $A=B$.
2004 Germany Team Selection Test
Let $ABC$ be an isosceles triangle with $AC=BC$, whose incentre is $I$. Let $P$ be a point on the circumcircle of the triangle $AIB$ lying inside the triangle $ABC$. The lines through $P$ parallel to $CA$ and $CB$ meet $AB$ at $D$ and $E$, respectively. The line through $P$ parallel to $AB$ meets $CA$ and $CB$ at $F$ and $G$, respectively. Prove that the lines $DF$ and $EG$ intersect on the circumcircle of the triangle $ABC$.



Proposed by Hojoo Lee, Korea
2004 Germany Team Selection Test
Let $a_{ij}$ $i=1,2,3$; $j=1,2,3$ be real numbers such that $a_{ij}$ is positive for $i=j$ and negative for $i\neq j$.



Prove the existence of positive real numbers $c_{1}$, $c_{2}$, $c_{3}$ such that the numbers $$a_{11}c_{1}+a_{12}c_{2}+a_{13}c_{3},\qquad a_{21}c_{1}+a_{22}c_{2}+a_{23}c_{3},\qquad a_{31}c_{1}+a_{32}c_{2}+a_{33}c_{3}$$are either all negative, all positive, or all zero.



Proposed by Kiran Kedlaya, USA
2004 Germany Team Selection Test
Let $n \geq 5$ be a given integer.  Determine the greatest integer $k$ for which there exists a polygon with $n$ vertices (convex or not, with non-selfintersecting boundary) having $k$ internal right angles.



Proposed by Juozas Juvencijus Macys, Lithuania
2004 Germany Team Selection Test
Let $ABC$ be a triangle with semiperimeter $s$ and inradius $r$. The semicircles with diameters $BC$, $CA$, $AB$ are drawn on the outside of the triangle $ABC$. The circle tangent to all of these three semicircles has radius $t$. Prove that

$$\frac{s}{2}<t\le\frac{s}{2}+\left(1-\frac{\sqrt{3}}{2}\right)r. $$

Alternative formulation. In a triangle $ABC$, construct circles with diameters $BC$, $CA$, and $AB$, respectively. Construct a circle $w$ externally tangent to these three circles. Let the radius of this circle $w$ be $t$.

Prove: $\frac{s}{2}<t\le\frac{s}{2}+\frac12\left(2-\sqrt3\right)r$, where $r$ is the inradius and $s$ is the semiperimeter of triangle $ABC$.



Proposed by Dirk Laurie, South Africa
2004 Germany Team Selection Test
Each positive integer $a$ undergoes the following procedure in order to obtain the number $d = d\left(a\right)$:



(i) move the last digit of $a$ to the first position to obtain the numb er $b$;

(ii) square $b$ to obtain the number $c$;

(iii) move the first digit of $c$ to the end to obtain the number $d$.



(All the numbers in the problem are considered to be represented in base $10$.)  For example, for $a=2003$, we get $b=3200$, $c=10240000$, and $d = 02400001 = 2400001 = d(2003)$.)



Find all numbers $a$ for which $d\left( a\right) =a^2$.



Proposed by Zoran Sunic, USA
2004 Germany Team Selection Test
Three distinct points $A$, $B$, and $C$ are fixed on a line in this order.  Let $\Gamma$ be a circle passing through $A$ and $C$ whose center does not lie on the line $AC$.  Denote by $P$ the intersection of the tangents to $\Gamma$ at $A$ and $C$.  Suppose $\Gamma$ meets the segment $PB$ at $Q$.  Prove that the intersection of the bisector of $\angle AQC$ and the line $AC$ does not depend on the choice of $\Gamma$.
2004 Germany Team Selection Test
Every point with integer coordinates in the plane is the center of a disk with radius $1/1000$.



(1) Prove that there exists an equilateral triangle whose vertices lie in different discs.



(2) Prove that every equilateral triangle with vertices in different discs has side-length greater than $96$.



Radu Gologan, Romania

RemarkThe "> 96" in (b) can be strengthened to "> 124". By the way, part (a) of this problem is the place where I used the well-known "Dedekind" theorem.
2004 Germany Team Selection Test
Let $ABC$ be an acute triangle, and let $M$ and $N$ be two points on the line $AC$ such that the vectors $MN$ and $AC$ are identical. Let $X$ be the orthogonal projection of $M$ on $BC$, and let $Y$ be the orthogonal projection of $N$ on $AB$. Finally, let $H$ be the orthocenter of triangle $ABC$.



Show that the points $B$, $X$, $H$, $Y$ lie on one circle.
2004 Germany Team Selection Test
Find all pairs of positive integers $\left(n;\;k\right)$ such that $n!=\left( n+1\right)^{k}-1$.
2004 Germany Team Selection Test
Let $n \geq 2$ be a natural number, and let $\left( a_{1};\;a_{2};\;...;\;a_{n}\right)$ be a permutation of $\left(1;\;2;\;...;\;n\right)$. For any integer $k$ with $1 \leq k \leq n$, we place $a_k$ raisins on the position $k$ of the real number axis. [The real number axis is the $x$-axis of a Cartesian coordinate system.]



Now, we place three children A, B, C on the positions $x_A$, $x_B$, $x_C$, each of the numbers $x_A$, $x_B$, $x_C$ being an element of $\left\{1;\;2;\;...;\;n\right\}$. [It is not forbidden to place different children on the same place!]



For any $k$, the $a_k$ raisins placed on the position $k$ are equally handed out to those children whose positions are next to $k$. [So, if there is only one child lying next to $k$, then he gets the raisin. If there are two children lying next to $k$ (either both on the same position or symmetric with respect to $k$), then each of them gets one half of the raisin. Etc..]



After all raisins are distributed, a child is unhappy if he could have received more raisins than he actually has received if he had moved to another place (while the other children would rest on their places).



For which $n$ does there exist a configuration $\left( a_{1};\;a_{2};\;...;\;a_{n}\right)$ and numbers $x_A$, $x_B$, $x_C$, such that all three children are happy?
2004 Germany Team Selection Test
Let n be a positive integer. Find all complex numbers $x_{1}$, $x_{2}$, ..., $x_{n}$ satisfying the following system of equations:



$x_{1}+2x_{2}+...+nx_{n}=0$,

$x_{1}^{2}+2x_{2}^{2}+...+nx_{n}^{2}=0$,

...

$x_{1}^{n}+2x_{2}^{n}+...+nx_{n}^{n}=0$.
2004 Germany Team Selection Test
Let $ABC$ be a triangle and let $P$ be a point in its interior.  Denote by $D$, $E$, $F$ the feet of the perpendiculars from $P$ to the lines $BC$, $CA$, $AB$, respectively.  Suppose that $$AP^2 + PD^2 = BP^2 + PE^2 = CP^2 + PF^2.$$Denote by $I_A$, $I_B$, $I_C$ the excenters of the triangle $ABC$.  Prove that $P$ is the circumcenter of the triangle $I_AI_BI_C$.



Proposed by C.R. Pranesachar, India
2004 Germany Team Selection Test
Let $ b$ be an integer greater than $ 5$. For each positive integer $ n$, consider the number $$ x_n = \underbrace{11\cdots1}_{n - 1}\underbrace{22\cdots2}_{n}5, $$ written in base $ b$.



Prove that the following condition holds if and only if $ b = 10$: there exists a positive integer $ M$ such that for any integer $ n$ greater than $ M$,  the number $ x_n$ is a perfect square.



Proposed by Laurentiu Panaitopol, Romania
2004 Germany Team Selection Test
The $A$-excircle of a triangle $ABC$ touches the side $BC$ at the point $K$ and the extended side $AB$ at the point $L$. The $B$-excircle touches the lines $BA$ and $BC$ at the points $M$ and $N$, respectively. The lines $KL$ and $MN$ meet at the point $X$.



Show that the line $CX$ bisects the angle $ACN$.
2004 Germany Team Selection Test
Find all functions $f: \Bbb{R}_{0}^{+}\rightarrow \Bbb{R}_{0}^{+}$ with the following properties:



(a) We have $f\left( xf\left( y\right) \right) \cdot f\left( y\right) =f\left( x+y\right)$ for all $x$ and $y$.

(b) We have $f\left(2\right) = 0$.

(c) For every $x$ with $0 < x < 2$, the value $f\left(x\right)$ doesn't equal $0$.



NOTE. We denote by $\Bbb{R}_{0}^{+}$ the set of all non-negative real numbers.
2004 Germany Team Selection Test
We attach to the vertices of a regular hexagon the numbers $1$, $0$, $0$, $0$, $0$, $0$. Now, we are allowed to transform the numbers by the following rules:



(a) We can add an arbitrary integer to the numbers at two opposite vertices.

(b) We can add an arbitrary integer to the numbers at three vertices forming an equilateral triangle.

(c) We can subtract an integer $t$ from one of the six numbers and simultaneously add $t$ to the two neighbouring numbers.



Can we, just by acting several times according to these rules, get a cyclic permutation of the initial numbers? (I. e., we started with $1$, $0$, $0$, $0$, $0$, $0$; can we now get $0$, $1$, $0$, $0$, $0$, $0$, or $0$, $0$, $1$, $0$, $0$, $0$, or $0$, $0$, $0$, $1$, $0$, $0$, or $0$, $0$, $0$, $0$, $1$, $0$, or $0$, $0$, $0$, $0$, $0$, $1$ ?)
2004 Germany Team Selection Test
Let the positive integers $x_1$, $x_2$, $...$, $x_{100}$ satisfy the equation

$$\frac{1}{\sqrt{x_1}}+\frac{1}{\sqrt{x_2}}+...+\frac{1}{\sqrt{x_{100}}}=20.$$

Show that at least two of these integers are equal to each other.
2004 Germany Team Selection Test
Consider pairs of the sequences of positive real numbers $$a_1\geq a_2\geq a_3\geq\cdots,\qquad b_1\geq b_2\geq b_3\geq\cdots$$and the sums $$A_n = a_1 + \cdots + a_n,\quad B_n = b_1 + \cdots + b_n;\qquad n = 1,2,\ldots.$$For any pair define $c_n = \min\{a_i,b_i\}$ and $C_n = c_1 + \cdots + c_n$, $n=1,2,\ldots$.





(1) Does there exist a pair $(a_i)_{i\geq 1}$, $(b_i)_{i\geq 1}$ such that the sequences $(A_n)_{n\geq 1}$ and $(B_n)_{n\geq 1}$ are unbounded while the sequence $(C_n)_{n\geq 1}$ is bounded?



(2) Does the answer to question (1) change by assuming additionally that $b_i = 1/i$, $i=1,2,\ldots$?



Justify your answer.
2004 Germany Team Selection Test
Let $d$ be a diameter of a circle $k$, and let $A$ be an arbitrary point on this diameter $d$ in the interior of $k$. Further, let $P$ be a point in the exterior of $k$. The circle with diameter $PA$ meets the circle $k$ at the points $M$ and $N$.



Find all points $B$ on the diameter $d$ in the interior of $k$ such that

$$\measuredangle MPA = \measuredangle BPN    \quad \text{and} \quad    PA \leq PB.$$

(i. e. give an explicit description of these points without using the points $M$ and $N$).
2004 Germany Team Selection Test
Let $f(k)$ be the number of integers $n$ satisfying the following conditions:



(i) $0\leq n < 10^k$ so $n$ has exactly $k$ digits (in decimal notation), with leading zeroes allowed;



(ii) the digits of $n$ can be permuted in such a way that they yield an integer divisible by $11$.



Prove that $f(2m) = 10f(2m-1)$ for every positive integer $m$.



Proposed by Dirk Laurie, South Africa
2004 Germany Team Selection Test
Consider the real number axis (i. e. the $x$-axis of a Cartesian coordinate system). We mark the points $1$, $2$, ..., $2n$ on this axis. A flea starts at the point $1$. Now it jumps along the real number axis; it can jump only from a marked point to another marked point, and it doesn't visit any point twice. After the ($2n-1$)-th jump, it arrives at a point from where it cannot jump any more after this rule, since all other points are already visited. Hence, with its $2n$-th jump, the flea breaks this rule and gets back to the point $1$. Assume that the sum of the (non-directed) lengths of the first $2n-1$ jumps of the flea was $n\left(2n-1\right)$. Show that the length of the last ($2n$-th) jump is $n$.
2004 Germany Team Selection Test
Let two chords $AC$ and $BD$ of a circle $k$ meet at the point $K$, and let $O$ be the center of $k$. Let $M$ and $N$ be the circumcenters of triangles $AKB$ and $CKD$. Show that the quadrilateral $OMKN$ is a parallelogram.
2004 Germany Team Selection Test
We consider graphs with vertices colored black or white. "Switching" a vertex means: coloring it black if it was formerly white, and coloring it white if it was formerly black.



Consider a finite graph with all vertices colored white. Now, we can do the following operation: Switch a vertex and simultaneously switch all of its neighbours (i. e. all vertices connected to this vertex by an edge). Can we, just by performing this operation several times, obtain a graph with all vertices colored black?



[It is assumed that our graph has no loops (a loop means an edge connecting one vertex with itself) and no multiple edges (a multiple edge means a pair of vertices connected by more than one edge).]
2003 Germany Team Selection Test
At a chess tournament the winner gets 1 point and the defeated one 0 points. A tie makes both obtaining $\frac{1}{2}$ points. 14 players, none of them equally aged, participated in a competition where everybody played against all the other players. After the competition a ranking was carried out. Of the two players with the same number of points the younger received the better ranking. After the competition Jan realizes that the best three players together got as many points as the last 9 players obtained points together. And Joerg noted that the number of ties was maximal. Determine the number of ties.
2003 Germany Team Selection Test
Given a triangle $ABC$ and a point $M$ such that the lines $MA,MB,MC$ intersect the lines $BC,CA,AB$ in this order in points $D,E$ and $F,$ respectively. Prove that there are numbers $\epsilon_1, \epsilon_2, \epsilon_3 \in \{-1, 1\}$ such that:



$$\epsilon_1 \cdot \frac{MD}{AD} + \epsilon_2 \cdot \frac{ME}{BE} + \epsilon_3 \cdot \frac{MF}{CF} = 1.$$
2003 Germany Team Selection Test
Let $N$ be a natural number and $x_1, \ldots , x_n$ further natural numbers less than $N$ and such that the least common multiple of any two of these $n$ numbers is greater than $N$. Prove that the sum of the reciprocals of these $n$ numbers is always less than $2$: $\sum^n_{i=1} \frac{1}{x_i} < 2.$
2003 Germany Team Selection Test
Find all functions $f$ from the reals to the reals such that



$$f\left(f(x)+y\right)=2x+f\left(f(y)-x\right)$$



for all real $x,y$.
2003 Germany Team Selection Test
For $n$ an odd positive integer, the unit squares of an $n\times n$ chessboard are coloured alternately black and white, with the four corners coloured black. A it tromino is an $L$-shape formed by three connected unit squares. For which values of $n$ is it possible to cover all the black squares with non-overlapping trominos?  When it is possible, what is the minimum number of trominos needed?
2002 Germany Team Selection Test
Determine the number of all numbers which are represented as $x^2+y^2$ with $x, y \in \{1, 2, 3, \ldots, 1000\}$ and which are divisible by 121.
2002 Germany Team Selection Test
Prove: If $x, y, z$ are the lengths of the angle bisectors of a triangle with perimeter 6, than we have:



$$\frac{1}{x^2} + \frac{1}{y^2} + \frac{1}{z^2} \geq 1.$$
2002 Germany Team Selection Test
Determine all $(x,y) \in \mathbb{N}^2$ which satisfy $x^{2y} + (x+1)^{2y} = (x+2)^{2y}.$
2002 Germany Team Selection Test
Let $P$ denote the set of all ordered pairs $ \left(p,q\right)$ of nonnegative integers. Find all functions $f: P \rightarrow \mathbb{R}$ satisfying

$$ f(p,q) = \begin{cases} 0 & \text{if} \; pq = 0, \\
1 + \frac{1}{2} f(p+1,q-1) +  \frac{1}{2} f(p-1,q+1) & \text{otherwise} \end{cases}

$$



Compare IMO shortlist problem 2001, algebra A1 for the three-variable case.
2002 Germany Team Selection Test
Let $A_1$ be the center of the square inscribed in acute triangle $ABC$ with two vertices of the square on side $BC$.  Thus one of the two remaining vertices of the square is on side $AB$ and the other is on $AC$. Points $B_1,\ C_1$ are defined in a similar way for inscribed squares with two vertices on sides $AC$ and $AB$, respectively. Prove that lines $AA_1,\ BB_1,\ CC_1$ are concurrent.
2002 Germany Team Selection Test
Prove that there is no positive integer $n$ such that, for $k = 1,2,\ldots,9$, the leftmost digit (in decimal notation) of $(n+k)!$ equals $k$.
1978 Germany Team Selection Test
Let $E$ be a set of $n$ points in the plane $(n \geq 3)$ whose coordinates are integers such that any three points from $E$ are vertices of a nondegenerate triangle whose centroid doesnt have both coordinates integers. Determine the maximal $n.$
1978 Germany Team Selection Test
Let $S$ be a convex quadrilateral $ABCD$ and $O$ a point inside it. The feet of the perpendiculars from $O$ to $AB, BC, CD, DA$ are $A_1, B_1, C_1, D_1$ respectively. The feet of the perpendiculars from $O$ to the sides of $S_i$, the quadrilateral $A_iB_iC_iD_i$, are $A_{i+1}B_{i+1}C_{i+1}D_{i+1}$, where $i = 1, 2, 3.$ Prove that $S_4$ is similar to S.
1978 Germany Team Selection Test
Let $n$ be an integer greater than $1$. Define



$$x_1 = n, y_1 = 1, x_{i+1} =\left[ \frac{x_i+y_i}{2}\right] , y_{i+1} = \left[ \frac{n}{x_{i+1}}\right], \qquad \text{for }i = 1, 2, \ldots\ ,$$



where $[z]$ denotes the largest integer less than or equal to $z$. Prove that

$$ \min \{x_1, x_2, \ldots,  x_n \} =[ \sqrt n ]$$