ChenDRAG/VeRL_math_validation huggingface dataset:
Problem: Xenia and Sergey play the following game. Xenia thinks of a positive integer $N$ not exceeding 5000. Then she fixes 20 distinct positive integers $a_{1}, a_{2}, \ldots, a_{20}$ such that, for each $k=1,2, \ldots, 20$, the numbers $N$ and $a_{k}$ are congruent modulo $k$. By a move, Sergey tells Xenia a set $S$ of positive integers not exceeding 20 , and she tells him back the set $\left\{a_{k}: k \in S\right\}$ without spelling out which number corresponds to which index. How many moves does Sergey need to determine for sure the number Xenia thought of?
Answer: 2
Problem: Given a positive integer $n$, determine the largest real number $\mu$ satisfying the following condition: for every $4 n$-point configuration $C$ in an open unit square $U$, there exists an open rectangle in $U$, whose sides are parallel to those of $U$, which contains exactly one point of $C$, and has an area greater than or equal to $\mu$.
Answer: \frac{1}{2 n+2}
Problem: 
Find (in closed form) the difference between the number of positive integers at most $2^{2017}$ with even weight and the number of positive integers at most $2^{2017}$ with odd weight.
Answer: 2^{1009}
Problem: Determine all positive integers $n$ satisfying the following condition: for every monic polynomial $P$ of degree at most $n$ with integer coefficients, there exists a positive integer $k \leq n$, and $k+1$ distinct integers $x_{1}, x_{2}, \ldots, x_{k+1}$ such that



$$

P\left(x_{1}\right)+P\left(x_{2}\right)+\cdots+P\left(x_{k}\right)=P\left(x_{k+1}\right) .

$$


Note. A polynomial is monic if the coefficient of the highest power is one.
Answer: 2
Problem: Let $n$ be an integer greater than 1 and let $X$ be an $n$-element set. A non-empty collection of subsets $A_{1}, \ldots, A_{k}$ of $X$ is tight if the union $A_{1} \cup \cdots \cup A_{k}$ is a proper subset of $X$ and no element of $X$ lies in exactly one of the $A_{i}$ s. Find the largest cardinality of a collection of proper non-empty subsets of $X$, no non-empty subcollection of which is tight.



Note. A subset $A$ of $X$ is proper if $A \neq X$. The sets in a collection are assumed to be distinct. The whole collection is assumed to be a subcollection.
Answer: 2n-2
Problem: Determine all prime numbers $p$ and all positive integers $x$ and $y$ satisfying $x^{3}+y^{3}=$ $p(x y+p)$.
Answer: (1,8,19), (2,7,13), (4,5,7)
Problem: Let $n \geqslant 2$ be an integer, and let $f$ be a $4 n$-variable polynomial with real coefficients. Assume that, for any $2 n$ points $\left(x_{1}, y_{1}\right), \ldots,\left(x_{2 n}, y_{2 n}\right)$ in the plane, $f\left(x_{1}, y_{1}, \ldots, x_{2 n}, y_{2 n}\right)=0$ if and only if the points form the vertices of a regular $2 n$-gon in some order, or are all equal.



Determine the smallest possible degree of $f$.
Answer: 2n
Problem: For a positive integer $a$, define a sequence of integers $x_{1}, x_{2}, \ldots$ by letting $x_{1}=a$ and $x_{n+1}=2 x_{n}+1$ for $n \geq 1$. Let $y_{n}=2^{x_{n}}-1$. Determine the largest possible $k$ such that, for some positive integer $a$, the numbers $y_{1}, \ldots, y_{k}$ are all prime.
Answer: 2
Problem: Let $n$ be a positive integer and fix $2 n$ distinct points on a circumference. Split these points into $n$ pairs and join the points in each pair by an arrow (i.e., an oriented line segment). The resulting configuration is good if no two arrows cross, and there are no arrows $\overrightarrow{A B}$ and $\overrightarrow{C D}$ such that $A B C D$ is a convex quadrangle oriented clockwise. Determine the number of good configurations.
Answer: \binom{2n}{n}
Problem: Given positive integers $m$ and $n \geq m$, determine the largest number of dominoes $(1 \times 2$ or $2 \times 1$ rectangles) that can be placed on a rectangular board with $m$ rows and $2 n$ columns consisting of cells $(1 \times 1$ squares $)$ so that:



(i) each domino covers exactly two adjacent cells of the board;



(ii) no two dominoes overlap;



(iii) no two form a $2 \times 2$ square; and



(iv) the bottom row of the board is completely covered by $n$ dominoes.
Answer: m n-\lfloor m / 2\rfloor
Problem: A cubic sequence is a sequence of integers given by $a_{n}=n^{3}+b n^{2}+c n+d$, where $b, c$ and $d$ are integer constants and $n$ ranges over all integers, including negative integers.

Determine the possible values of $a_{2015} \cdot a_{2016}$ for a cubic sequence satisfying the condition in part (a).
Answer: 0
Problem: Find all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$ such that

$$
f(x+f(y))=f(x+y)+f(y)\tag{1}
$$

for all $x, y \in \mathbb{R}^{+}$. (Symbol $\mathbb{R}^{+}$denotes the set of all positive real numbers.)
Answer: f(x)=2 x
Problem: Let $n>1$ be an integer. In the space, consider the set
$$
S=\{(x, y, z) \mid x, y, z \in\{0,1, \ldots, n\}, x+y+z>0\}
$$
Find the smallest number of planes that jointly contain all $(n+1)^{3}-1$ points of $S$ but none of them passes through the origin.
Answer: 3 n
Problem: Find all positive integers $n$, for which the numbers in the set $S=\{1,2, \ldots, n\}$ can be colored red and blue, with the following condition being satisfied: the set $S \times S \times S$ contains exactly 2007 ordered triples $(x, y, z)$ such that (i) $x, y, z$ are of the same color and (ii) $x+y+z$ is divisible by $n$.
Answer: 69$,$84
Problem: Determine the smallest positive real number $k$ with the following property.

Let $A B C D$ be a convex quadrilateral, and let points $A_{1}, B_{1}, C_{1}$ and $D_{1}$ lie on sides $A B, B C$, $C D$ and $D A$, respectively. Consider the areas of triangles $A A_{1} D_{1}, B B_{1} A_{1}, C C_{1} B_{1}$, and $D D_{1} C_{1}$; let $S$ be the sum of the two smallest ones, and let $S_{1}$ be the area of quadrilateral $A_{1} B_{1} C_{1} D_{1}$. Then we always have $k S_{1} \geq S$.
Answer: k=1
Problem: Find all pairs $(k, n)$ of positive integers for which $7^{k}-3^{n}$ divides $k^{4}+n^{2}$.
Answer: (2,4)
Problem: Find all surjective functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that for every $m, n \in \mathbb{N}$ and every prime $p$, the number $f(m+n)$ is divisible by $p$ if and only if $f(m)+f(n)$ is divisible by $p$.

( $\mathbb{N}$ is the set of all positive integers.)
Answer: f(n)=n
Problem: Determine all pairs $(f, g)$ of functions from the set of positive integers to itself that satisfy

$$
f^{g(n)+1}(n)+g^{f(n)}(n)=f(n+1)-g(n+1)+1
$$

for every positive integer $n$. Here, $f^{k}(n)$ means $\underbrace{f(f(\ldots f}_{k}(n) \ldots))$.
Answer: f(n)=n$, $g(n)=1
Problem: Determine the greatest positive integer $k$ that satisfies the following property: The set of positive integers can be partitioned into $k$ subsets $A_{1}, A_{2}, \ldots, A_{k}$ such that for all integers $n \geq 15$ and all $i \in\{1,2, \ldots, k\}$ there exist two distinct elements of $A_{i}$ whose sum is $n$.
Answer: 3
Problem: Let $m$ be a positive integer and consider a checkerboard consisting of $m$ by $m$ unit squares. At the midpoints of some of these unit squares there is an ant. At time 0, each ant starts moving with speed 1 parallel to some edge of the checkerboard. When two ants moving in opposite directions meet, they both turn $90^{\circ}$ clockwise and continue moving with speed 1 . When more than two ants meet, or when two ants moving in perpendicular directions meet, the ants continue moving in the same direction as before they met. When an ant reaches one of the edges of the checkerboard, it falls off and will not re-appear.

Considering all possible starting positions, determine the latest possible moment at which the last ant falls off the checkerboard or prove that such a moment does not necessarily exist.
Answer: \frac{3 m}{2}-1
Problem: On a square table of 2011 by 2011 cells we place a finite number of napkins that each cover a square of 52 by 52 cells. In each cell we write the number of napkins covering it, and we record the maximal number $k$ of cells that all contain the same nonzero number. Considering all possible napkin configurations, what is the largest value of $k$ ?
Answer: 3986729
Problem: For each positive integer $k$, let $t(k)$ be the largest odd divisor of $k$. Determine all positive integers $a$ for which there exists a positive integer $n$ such that all the differences

$$
t(n+a)-t(n), \quad t(n+a+1)-t(n+1), \quad \ldots, \quad t(n+2 a-1)-t(n+a-1)
$$

are divisible by 4 .
Answer: 1,3,5
Problem: Let $x_{1}, \ldots, x_{100}$ be nonnegative real numbers such that $x_{i}+x_{i+1}+x_{i+2} \leq 1$ for all $i=1, \ldots, 100$ (we put $x_{101}=x_{1}, x_{102}=x_{2}$ ). Find the maximal possible value of the sum

$$
S=\sum_{i=1}^{100} x_{i} x_{i+2}
$$
Answer: \frac{25}{2}
Problem: Denote by $\mathbb{Q}^{+}$the set of all positive rational numbers. Determine all functions $f: \mathbb{Q}^{+} \rightarrow \mathbb{Q}^{+}$ which satisfy the following equation for all $x, y \in \mathbb{Q}^{+}$:

$$
f\left(f(x)^{2} y\right)=x^{3} f(x y)
\tag{1}
$$
Answer: f(x)=\frac{1}{x}
Problem: On some planet, there are $2^{N}$ countries $(N \geq 4)$. Each country has a flag $N$ units wide and one unit high composed of $N$ fields of size $1 \times 1$, each field being either yellow or blue. No two countries have the same flag.

We say that a set of $N$ flags is diverse if these flags can be arranged into an $N \times N$ square so that all $N$ fields on its main diagonal will have the same color. Determine the smallest positive integer $M$ such that among any $M$ distinct flags, there exist $N$ flags forming a diverse set.
Answer: M=2^{N-2}+1
Problem: 2500 chess kings have to be placed on a $100 \times 100$ chessboard so that

(i) no king can capture any other one (i.e. no two kings are placed in two squares sharing a common vertex);

(ii) each row and each column contains exactly 25 kings.

Find the number of such arrangements. (Two arrangements differing by rotation or symmetry are supposed to be different.)
Answer: 2
Problem: Find the least positive integer $n$ for which there exists a set $\left\{s_{1}, s_{2}, \ldots, s_{n}\right\}$ consisting of $n$ distinct positive integers such that

$$
\left(1-\frac{1}{s_{1}}\right)\left(1-\frac{1}{s_{2}}\right) \ldots\left(1-\frac{1}{s_{n}}\right)=\frac{51}{2010}
$$
Answer: 39
Problem: Find all pairs $(m, n)$ of nonnegative integers for which

$$
m^{2}+2 \cdot 3^{n}=m\left(2^{n+1}-1\right)
\tag{1}
$$
Answer: (6,3),(9,3),(9,5),(54,5)
Problem: Find the smallest number $n$ such that there exist polynomials $f_{1}, f_{2}, \ldots, f_{n}$ with rational coefficients satisfying

$$
x^{2}+7=f_{1}(x)^{2}+f_{2}(x)^{2}+\cdots+f_{n}(x)^{2} .
$$
Answer: 5
Problem: Determine the smallest number $M$ such that the inequality

$$
\left|a b\left(a^{2}-b^{2}\right)+b c\left(b^{2}-c^{2}\right)+c a\left(c^{2}-a^{2}\right)\right| \leq M\left(a^{2}+b^{2}+c^{2}\right)^{2}
$$

holds for all real numbers $a, b, c$.
Answer: M=\frac{9}{32} \sqrt{2}
Problem: A diagonal of a regular 2006-gon is called odd if its endpoints divide the boundary into two parts, each composed of an odd number of sides. Sides are also regarded as odd diagonals.

Suppose the 2006-gon has been dissected into triangles by 2003 nonintersecting diagonals. Find the maximum possible number of isosceles triangles with two odd sides.
Answer: 1003
Problem: In triangle $A B C$, let $J$ be the centre of the excircle tangent to side $B C$ at $A_{1}$ and to the extensions of sides $A C$ and $A B$ at $B_{1}$ and $C_{1}$, respectively. Suppose that the lines $A_{1} B_{1}$ and $A B$ are perpendicular and intersect at $D$. Let $E$ be the foot of the perpendicular from $C_{1}$ to line $D J$. Determine the angles $\angle B E A_{1}$ and $\angle A E B_{1}$.
Answer: \angle B E A_{1}=90$,$\angle A E B_{1}=90
Problem: Determine all pairs $(x, y)$ of integers satisfying the equation

$$
1+2^{x}+2^{2 x+1}=y^{2}
$$
Answer: (0,2),(0,-2),(4,23),(4,-23)
Problem: Given a positive integer $n$, find the smallest value of $\left\lfloor\frac{a_{1}}{1}\right\rfloor+\left\lfloor\frac{a_{2}}{2}\right\rfloor+\cdots+\left\lfloor\frac{a_{n}}{n}\right\rfloor$ over all permutations $\left(a_{1}, a_{2}, \ldots, a_{n}\right)$ of $(1,2, \ldots, n)$.
Answer: \left\lfloor\log _{2} n\right\rfloor+1
Problem: Let $n \geqslant 3$ be an integer. An integer $m \geqslant n+1$ is called $n$-colourful if, given infinitely many marbles in each of $n$ colours $C_{1}, C_{2}, \ldots, C_{n}$, it is possible to place $m$ of them around a circle so that in any group of $n+1$ consecutive marbles there is at least one marble of colour $C_{i}$ for each $i=1, \ldots, n$.

Prove that there are only finitely many positive integers which are not $n$-colourful. Find the largest among them.
Answer: m_{\max }=n^{2}-n-1
Problem: Determine the largest $N$ for which there exists a table $T$ of integers with $N$ rows and 100 columns that has the following properties:

(i) Every row contains the numbers 1,2, ., 100 in some order.

(ii) For any two distinct rows $r$ and $s$, there is a column $c$ such that $|T(r, c)-T(s, c)| \geqslant 2$.

Here $T(r, c)$ means the number at the intersection of the row $r$ and the column $c$.
Answer: \frac{100!}{2^{50}}
Problem: Determine all integers $n \geqslant 1$ for which there exists a pair of positive integers $(a, b)$ such that no cube of a prime divides $a^{2}+b+3$ and

$$
\frac{a b+3 b+8}{a^{2}+b+3}=n
$$
Answer: 2
Problem: Find all positive integers $n$ with the following property: the $k$ positive divisors of $n$ have a permutation $\left(d_{1}, d_{2}, \ldots, d_{k}\right)$ such that for every $i=1,2, \ldots, k$, the number $d_{1}+\cdots+d_{i}$ is a perfect square.
Answer: 1,3
Problem: Let $q$ be a real number. Gugu has a napkin with ten distinct real numbers written on it, and he writes the following three lines of real numbers on the blackboard:

- In the first line, Gugu writes down every number of the form $a-b$, where $a$ and $b$ are two (not necessarily distinct) numbers on his napkin.
- In the second line, Gugu writes down every number of the form $q a b$, where $a$ and $b$ are two (not necessarily distinct) numbers from the first line.
- In the third line, Gugu writes down every number of the form $a^{2}+b^{2}-c^{2}-d^{2}$, where $a, b, c, d$ are four (not necessarily distinct) numbers from the first line.

Determine all values of $q$ such that, regardless of the numbers on Gugu's napkin, every number in the second line is also a number in the third line.
Answer: -2,0,2
Problem: An integer $n \geqslant 3$ is given. We call an $n$-tuple of real numbers $\left(x_{1}, x_{2}, \ldots, x_{n}\right)$ Shiny if for each permutation $y_{1}, y_{2}, \ldots, y_{n}$ of these numbers we have

$$
\sum_{i=1}^{n-1} y_{i} y_{i+1}=y_{1} y_{2}+y_{2} y_{3}+y_{3} y_{4}+\cdots+y_{n-1} y_{n} \geqslant-1
$$

Find the largest constant $K=K(n)$ such that

$$
\sum_{1 \leqslant i<j \leqslant n} x_{i} x_{j} \geqslant K
$$

holds for every Shiny $n$-tuple $\left(x_{1}, x_{2}, \ldots, x_{n}\right)$.
Answer: -(n-1) / 2
Problem: Let $n>1$ be an integer. An $n \times n \times n$ cube is composed of $n^{3}$ unit cubes. Each unit cube is painted with one color. For each $n \times n \times 1$ box consisting of $n^{2}$ unit cubes (of any of the three possible orientations), we consider the set of the colors present in that box (each color is listed only once). This way, we get $3 n$ sets of colors, split into three groups according to the orientation. It happens that for every set in any group, the same set appears in both of the other groups. Determine, in terms of $n$, the maximal possible number of colors that are present.
Answer: \frac{n(n+1)(2 n+1)}{6}
Problem: Let $n$ be a given positive integer. In the Cartesian plane, each lattice point with nonnegative coordinates initially contains a butterfly, and there are no other butterflies. The neighborhood of a lattice point $c$ consists of all lattice points within the axis-aligned $(2 n+1) \times$ $(2 n+1)$ square centered at $c$, apart from $c$ itself. We call a butterfly lonely, crowded, or comfortable, depending on whether the number of butterflies in its neighborhood $N$ is respectively less than, greater than, or equal to half of the number of lattice points in $N$.

Every minute, all lonely butterflies fly away simultaneously. This process goes on for as long as there are any lonely butterflies. Assuming that the process eventually stops, determine the number of comfortable butterflies at the final state.
Answer: n^{2}+1
Problem: There are 2017 mutually external circles drawn on a blackboard, such that no two are tangent and no three share a common tangent. A tangent segment is a line segment that is a common tangent to two circles, starting at one tangent point and ending at the other one. Luciano is drawing tangent segments on the blackboard, one at a time, so that no tangent segment intersects any other circles or previously drawn tangent segments. Luciano keeps drawing tangent segments until no more can be drawn. Find all possible numbers of tangent segments when he stops drawing.
Answer: 6048
Problem: Call a rational number short if it has finitely many digits in its decimal expansion. For a positive integer $m$, we say that a positive integer $t$ is $m$-tastic if there exists a number $c \in\{1,2,3, \ldots, 2017\}$ such that $\frac{10^{t}-1}{c \cdot m}$ is short, and such that $\frac{10^{k}-1}{c \cdot m}$ is not short for any $1 \leqslant k<t$. Let $S(m)$ be the set of $m$-tastic numbers. Consider $S(m)$ for $m=1,2, \ldots$ What is the maximum number of elements in $S(m)$ ?
Answer: 807
Problem: Find all pairs $(p, q)$ of prime numbers with $p>q$ for which the number

$$
\frac{(p+q)^{p+q}(p-q)^{p-q}-1}{(p+q)^{p-q}(p-q)^{p+q}-1}
$$

is an integer.
Answer: (3,2)
Problem: Find the smallest positive integer $n$, or show that no such $n$ exists, with the following property: there are infinitely many distinct $n$-tuples of positive rational numbers $\left(a_{1}, a_{2}, \ldots, a_{n}\right)$ such that both

$$
a_{1}+a_{2}+\cdots+a_{n} \quad \text { and } \quad \frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}}
$$

are integers.
Answer: 3
Problem: Find the smallest real constant $C$ such that for any positive real numbers $a_{1}, a_{2}, a_{3}, a_{4}$ and $a_{5}$ (not necessarily distinct), one can always choose distinct subscripts $i, j, k$ and $l$ such that

$$
\left|\frac{a_{i}}{a_{j}}-\frac{a_{k}}{a_{l}}\right| \leqslant C .\tag{1}
$$
Answer: \frac{1}{2}
Problem: The equation

$$
(x-1)(x-2) \cdots(x-2016)=(x-1)(x-2) \cdots(x-2016)
$$

is written on the board. One tries to erase some linear factors from both sides so that each side still has at least one factor, and the resulting equation has no real roots. Find the least number of linear factors one needs to erase to achieve this.
Answer: 2016
Problem: Determine the largest real number $a$ such that for all $n \geqslant 1$ and for all real numbers $x_{0}, x_{1}, \ldots, x_{n}$ satisfying $0=x_{0}<x_{1}<x_{2}<\cdots<x_{n}$, we have

$$
\frac{1}{x_{1}-x_{0}}+\frac{1}{x_{2}-x_{1}}+\cdots+\frac{1}{x_{n}-x_{n-1}} \geqslant a\left(\frac{2}{x_{1}}+\frac{3}{x_{2}}+\cdots+\frac{n+1}{x_{n}}\right) .\tag{1}
$$
Answer: \frac{4}{9}
Problem: Find all positive integers $n$ for which all positive divisors of $n$ can be put into the cells of a rectangular table under the following constraints:

- each cell contains a distinct divisor;
- the sums of all rows are equal; and
- the sums of all columns are equal.
Answer: 1
Problem: Let $n$ be a positive integer. Determine the smallest positive integer $k$ with the following property: it is possible to mark $k$ cells on a $2 n \times 2 n$ board so that there exists a unique partition of the board into $1 \times 2$ and $2 \times 1$ dominoes, none of which contains two marked cells.
Answer: 2 n
Problem: Define $P(n)=n^{2}+n+1$. For any positive integers $a$ and $b$, the set

$$
\{P(a), P(a+1), P(a+2), \ldots, P(a+b)\}
$$

is said to be fragrant if none of its elements is relatively prime to the product of the other elements. Determine the smallest size of a fragrant set.
Answer: 6
Problem: Denote by $\mathbb{N}$ the set of all positive integers. Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that for all positive integers $m$ and $n$, the integer $f(m)+f(n)-m n$ is nonzero and divides $m f(m)+n f(n)$.
Answer: f(n)=n^{2}
Problem: Let $n$ be a positive integer, and set $N=2^{n}$. Determine the smallest real number $a_{n}$ such that, for all real $x$,

$$
\sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant a_{n}(x-1)^{2}+x
$$
Answer: \frac{N}{2}
Problem: Let $\mathcal{A}$ denote the set of all polynomials in three variables $x, y, z$ with integer coefficients. Let $\mathcal{B}$ denote the subset of $\mathcal{A}$ formed by all polynomials which can be expressed as

$$
(x+y+z) P(x, y, z)+(x y+y z+z x) Q(x, y, z)+x y z R(x, y, z)
$$

with $P, Q, R \in \mathcal{A}$. Find the smallest non-negative integer $n$ such that $x^{i} y^{j} z^{k} \in \mathcal{B}$ for all nonnegative integers $i, j, k$ satisfying $i+j+k \geqslant n$.
Answer: 4
Problem: Suppose that $a, b, c, d$ are positive real numbers satisfying $(a+c)(b+d)=a c+b d$. Find the smallest possible value of

$$
S=\frac{a}{b}+\frac{b}{c}+\frac{c}{d}+\frac{d}{a}
$$
Answer: 8
Problem: Let $\mathbb{R}^{+}$be the set of positive real numbers. Determine all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$ such that, for all positive real numbers $x$ and $y$,

$$
f(x+f(x y))+y=f(x) f(y)+1
\tag{*}
$$
Answer: f(x)=x+1
Problem: Let $n$ be an integer with $n \geqslant 2$. On a slope of a mountain, $n^{2}$ checkpoints are marked, numbered from 1 to $n^{2}$ from the bottom to the top. Each of two cable car companies, $A$ and $B$, operates $k$ cable cars numbered from 1 to $k$; each cable car provides a transfer from some checkpoint to a higher one. For each company, and for any $i$ and $j$ with $1 \leqslant i<j \leqslant k$, the starting point of car $j$ is higher than the starting point of car $i$; similarly, the finishing point of car $j$ is higher than the finishing point of car $i$. Say that two checkpoints are linked by some company if one can start from the lower checkpoint and reach the higher one by using one or more cars of that company (no movement on foot is allowed).

Determine the smallest $k$ for which one can guarantee that there are two checkpoints that are linked by each of the two companies.
Answer: n^{2}-n+1
Problem: The Fibonacci numbers $F_{0}, F_{1}, F_{2}, \ldots$ are defined inductively by $F_{0}=0, F_{1}=1$, and $F_{n+1}=F_{n}+F_{n-1}$ for $n \geqslant 1$. Given an integer $n \geqslant 2$, determine the smallest size of a set $S$ of integers such that for every $k=2,3, \ldots, n$ there exist some $x, y \in S$ such that $x-y=F_{k}$.
Answer: \lceil n / 2\rceil+1
Problem: Players $A$ and $B$ play a game on a blackboard that initially contains 2020 copies of the number 1. In every round, player $A$ erases two numbers $x$ and $y$ from the blackboard, and then player $B$ writes one of the numbers $x+y$ and $|x-y|$ on the blackboard. The game terminates as soon as, at the end of some round, one of the following holds:

(1) one of the numbers on the blackboard is larger than the sum of all other numbers;

(2) there are only zeros on the blackboard.

Player $B$ must then give as many cookies to player $A$ as there are numbers on the blackboard. Player $A$ wants to get as many cookies as possible, whereas player $B$ wants to give as few as possible. Determine the number of cookies that $A$ receives if both players play optimally.
Answer: 7
Problem: Let $n$ be a positive integer. Harry has $n$ coins lined up on his desk, each showing heads or tails. He repeatedly does the following operation: if there are $k$ coins showing heads and $k>0$, then he flips the $k^{\text {th }}$ coin over; otherwise he stops the process. (For example, the process starting with THT would be THT $\rightarrow H H T \rightarrow H T T \rightarrow T T T$, which takes three steps.)

Letting $C$ denote the initial configuration (a sequence of $n H$ 's and $T$ 's), write $\ell(C)$ for the number of steps needed before all coins show $T$. Show that this number $\ell(C)$ is finite, and determine its average value over all $2^{n}$ possible initial configurations $C$.
Answer: \frac{1}{4} n(n+1)