dungnv/qwen36-27b-length-traces huggingface dataset:
On a flat plane in Camelot, King Arthur builds a labyrinth $\mathfrak{L}$ consisting of $n$ walls, each of which is an infinite straight line. No two walls are parallel, and no three walls have a common point. Merlin then paints one side of each wall entirely red and the other side entirely blue.

At the intersection of two walls there are four corners: two diagonally opposite corners where a red side and a blue side meet, one corner where two red sides meet, and one corner where two blue sides meet. At each such intersection, there is a two-way door connecting the two diagonally opposite corners at which sides of different colours meet.

After Merlin paints the walls, Morgana then places some knights in the labyrinth. The knights can walk through doors, but cannot walk through walls.

Let $k(\mathfrak{L})$ be the largest number $k$ such that, no matter how Merlin paints the labyrinth $\mathfrak{L}$, Morgana can always place at least $k$ knights such that no two of them can ever meet. For each $n$, what are all possible values for $k(\mathfrak{L})$, where $\mathfrak{L}$ is a labyrinth with $n$ walls?
Problem T1. Focus on sketches

Part A. Ballistics

A ball, thrown with an initial speed $v_{0}$, moves in a homogeneous gravitational field in the $x-z$ plane, where the $x$-axis is horizontal, and the $z$-axis is vertical and antiparallel to the free fall acceleration $g$. Neglect the effect of air drag.

i. By adjusting the launching angle for a ball thrown with a fixed initial speed $v_{0}$ from the origin, targets can be hit within the region given by

$$
z \leq z_{0}-k x^{2}
$$

You can use this fact without proving it. Find the constants $z_{0}$ and $k$.
Let $N$ be a six-digit number formed by an arrangement of the digits $1,2,3,3,4,5$. Compute the smallest value of $N$ that is divisible by 264 .
Let $T=7$. Compute the number of positive perfect cubes that are divisors of $(T+10) !$.
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.
Determine all integers $m$ for which the $m \times m$ square can be dissected into five rectangles, the side lengths of which are the integers $1,2,3, \ldots, 10$ in some order.
Let $T=17$. In ARMLovia, the unit of currency is the edwah. Janet's wallet contains bills in denominations of 20 and 80 edwahs. If the bills are worth an average of $2 T$ edwahs each, compute the smallest possible value of the bills in Janet's wallet.
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.
Let $T=\sqrt{26}$. Compute the number of ordered pairs of positive integers $(a, b)$ with the property that $a b=T^{20} \cdot 210^{12}$, and the greatest common divisor of $a$ and $b$ is 1 .
For some real numbers $m$ and $n$, the list $3 n^{2}, m^{2}, 2(n+1)^{2}$ consists of three consecutive integers written in increasing order. Determine all possible values of $m$.
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.
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.
Given that $a, b, c$, and $d$ are integers such that $a+b c=20$ and $-a+c d=19$, compute the greatest possible value of $c$.
Determine all real values of $x$ such that

$$
\log _{5 x+9}\left(x^{2}+6 x+9\right)+\log _{x+3}\left(5 x^{2}+24 x+27\right)=4
$$
Compute the least integer $n>1$ such that the product of all positive divisors of $n$ equals $n^{4}$.
Compute the smallest positive integer $n$ such that $n^{2}+n^{0}+n^{1}+n^{3}$ is a multiple of 13 .
A permutation of a list of numbers is an ordered arrangement of the numbers in that list. For example, $3,2,4,1,6,5$ is a permutation of $1,2,3,4,5,6$. We can write this permutation as $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}$, where $a_{1}=3, a_{2}=2, a_{3}=4, a_{4}=1, a_{5}=6$, and $a_{6}=5$.
Determine the average value of

$$
a_{1}-a_{2}+a_{3}-a_{4}+a_{5}-a_{6}+a_{7}
$$

over all permutations $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, a_{7}$ of $1,2,3,4,5,6,7$.
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}$.
Let $\mathcal{S}$ denote the set of all real polynomials $A(x)$ with leading coefficient 1 such that there exists a real polynomial $B(x)$ that satisfies

$$
\frac{1}{A(x)}+\frac{1}{B(x)}+\frac{1}{x+10}=\frac{1}{x}
$$

for all real numbers $x$ for which $A(x) \neq 0, B(x) \neq 0$, and $x \neq-10,0$. Compute $\sum_{A \in \mathcal{S}} A(10)$.
LIGO-GW150914

In 2015, the gravitational-wave observatory LIGO detected, for the first time, the passing of gravitational waves (GW) through Earth. This event, named GW150914, was triggered by waves produced by two black holes that were orbiting on quasi-circular orbits. This problem will make you estimate some physical parameters of the system, from the properties of the detected signal.

Part A: Newtonian (conservative) orbits
Context question:
A.1 Consider a system of two stars with masses $M_{1}, M_{2}$, at locations $\vec{r}_{1}, \vec{r}_{2}$, respectively, with respect to the center-of-mass of the system, that is,

$$
M_{1} \overrightarrow{r_{1}}+M_{2} \overrightarrow{r_{2}}=0 .
\tag{!}
$$

The stars are isolated from the rest of the Universe and moving at nonrelativistic velocities. Using Newton's laws, the acceleration vector of mass $M_{1}$ can be expressed as

$$
\frac{\mathrm{d}^{2} \vec{r}_{1}}{\mathrm{~d} t^{2}}=-\alpha \frac{\vec{r}_{1}}{r_{1}^{n}}
\tag{2}
$$

where $r_{1}=\left|\vec{r}_{1}\right|, r_{2}=\left|\vec{r}_{2}\right|$. Find $n \in \mathbb{N}$ and $\alpha=\alpha\left(G, M_{1}, M_{2}\right)$, where $G$ is Newton's constant $\left[G \simeq 6.67 \times 10^{-11} \mathrm{~N} \mathrm{~m}^{2} \mathrm{~kg}^{-2}\right]$.
Context answer:
\boxed{$n=3$ , $\alpha=\frac{G M_{2}^{3}}{(M_{1}+M_{2})^{2}}$}

A.2 The total energy of the 2-mass system, in circular orbits, can be expressed as:

$$
E=A(\mu, \Omega, L)-G \frac{M \mu}{L},
\tag{3}
$$

where

$$
\mu \equiv \frac{M_{1} M_{2}}{M_{1}+M_{2}}, \quad M \equiv M_{1}+M_{2}
\tag{4}
$$

are the reduced mass and total mass of the system, $\Omega$ is the angular velocity of each mass and $L$ is the total separation $L=r_{1}+r_{2}$. Obtain the explicit form of the term $A(\mu, \Omega, L)$.
$\quad$ Compute the least positive value of $t$ such that

$$
\operatorname{Arcsin}(\sin (t)), \operatorname{Arccos}(\cos (t)), \operatorname{Arctan}(\tan (t))
$$

form (in some order) a three-term arithmetic progression with a nonzero common difference.
Let $T=16$. An isosceles trapezoid has an area of $T+1$, a height of 2 , and the shorter base is 3 units shorter than the longer base. Compute the sum of the length of the shorter base and the length of one of the congruent sides.
A palindrome is a positive integer, not ending in 0 , that reads the same forwards and backwards. For example, 35253,171,44, and 2 are all palindromes, but 17 and 1210 are not. Compute the least positive integer greater than 2013 that cannot be written as the sum of two palindromes.
Let $N=888,888 \times 9,999,999$. Compute the sum of the digits of $N$.
Let $T=688$. Let $a$ be the least nonzero digit in $T$, and let $b$ be the greatest digit in $T$. In square $N O R M, N O=b$, and points $P_{1}$ and $P_{2}$ lie on $\overline{N O}$ and $\overline{O R}$, respectively, so that $O P_{1}=O P_{2}=a$. A circle centered at $O$ has radius $a$, and quarter-circular arc $\widehat{P_{1} P_{2}}$ is drawn. There is a circle that is tangent to $\widehat{P_{1} P_{2}}$ and to sides $\overline{M N}$ and $\overline{M R}$. The radius of this circle can be written in the form $x-y \sqrt{2}$, where $x$ and $y$ are positive integers. Compute $x+y$.
$\quad$ Compute the greatest integer $k \leq 1000$ such that $\left(\begin{array}{c}1000 \\ k\end{array}\right)$ is a multiple of 7 .
On the complex plane, the parallelogram formed by the points $0, z, \frac{1}{z}$, and $z+\frac{1}{z}$ has area $\frac{35}{37}$, and the real part of $z$ is positive. If $d$ is the smallest possible value of $\left|z+\frac{1}{z}\right|$, compute $d^{2}$.
Let $T=100$. Nellie has a flight from Rome to Athens that is scheduled to last for $T+30$ minutes. However, owing to a tailwind, her flight only lasts for $T$ minutes. The plane's speed is 1.5 miles per minute faster than what it would have been for the originally scheduled flight. Compute the distance (in miles) that the plane travels.
Particles and Waves

Wave-particle duality, which states that each particle can be described as a wave and vice versa, is one of the central concepts of quantum mechanics. In this problem, we will rely on this notion and just a few other basic assumptions to explore a selection of quantum phenomena covering the two distinct types of particles of the microworld-fermions and bosons.

 Part A. Quantum particle in a box

Consider a particle of mass $m$ moving in a one-dimensional potential well, where its potential energy $V(x)$ is given by

$$
V(x)= \begin{cases}0, & 0 \leq x \leq L \\ \infty, & x<0 \text { or } x>L\end{cases}
\tag{1}
$$

While classical particle can move in such a potential having any kinetic energy, for quantum particle only some specific positive discrete energy levels are allowed. In any such allowed state, the particle can be described as a standing de Broglie wave with nodes at the walls.

A.1 Determine the minimal possible energy $E_{\min }$ of the quantum particle in the well. Express your answer in terms of $m, L$, and the Planck's constant $h$.
The zeros of $x^{2}+b x+93$ are $r$ and $s$. If the zeros of $x^{2}-22 x+c$ are $r+1$ and $s+1$, compute $c$.
Let $10^{y}$ be the product of all real numbers $x$ such that $\log x=\frac{3+\left\lfloor(\log x)^{2}\right\rfloor}{4}$. Compute $y$.
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))$.
Particles from the Sun ${ }^{1}$ 

Photons from the surface of the Sun and neutrinos from its core can tell us about solar temperatures and also confirm that the Sun shines because of nuclear reactions.

Throughout this problem, take the mass of the Sun to be $M_{\odot}=2.00 \times 10^{30} \mathrm{~kg}$, its radius, $R_{\odot}=7.00 \times$ $10^{8} \mathrm{~m}$, its luminosity (radiation energy emitted per unit time), $L_{\odot}=3.85 \times 10^{26} \mathrm{~W}$, and the Earth-Sun distance, $d_{\odot}=1.50 \times 10^{11} \mathrm{~m}$.

Note:

(i) $\int x e^{a x} d x=\left(\frac{x}{a}-\frac{1}{a^{2}}\right) e^{a x}+$ constant

(ii) $\int x^{2} e^{a x} d x=\left(\frac{x^{2}}{a}-\frac{2 x}{a^{2}}+\frac{2}{a^{3}}\right) e^{a x}+$ constant

(iii) $\int x^{3} e^{a x} d x=\left(\frac{x^{3}}{a}-\frac{3 x^{2}}{a^{2}}+\frac{6 x}{a^{3}}-\frac{6}{a^{4}}\right) e^{a x}+$ constant

A Radiation from the sun :
Context question:
A.1 Assume that the Sun radiates like a perfect blackbody. Use this fact to calculate the temperature, $T_{\mathrm{s}}$, of the solar surface.
Context answer:
\boxed{$5.76 \times 10^{3} $}


Extra Supplementary Reading Materials:

The spectrum of solar radiation can be approximated well by the Wien distribution law. Accordingly, the solar energy incident on any surface on the Earth per unit time per unit frequency interval, $u(v)$, is given by

$$
u(v)=A \frac{R_{\odot}^{2}}{d_{\odot}^{2}} \frac{2 \pi h}{c^{2}} v^{3} \exp \left(-h v / k_{\mathrm{B}} T_{\mathrm{s}}\right)
$$

where $v$ is the frequency and $A$ is the area of the surface normal to the direction of the incident radiation.

Now, consider a solar cell which consists of a thin disc of semiconducting material of area, $A$, placed perpendicular to the direction of the Sun's rays.

A2 Using the Wien approximation, express the total radiated solar power, $P_{\mathrm{in}}$, incident on the surface of the <br> solar cell, in terms of $A, R_{\odot}, d_{\odot}, T_{\mathrm{S}}$ and the fundamental constants $c, h, k_{\mathrm{B}}$
The taxicab distance between points $A=\left(x_{A}, y_{A}\right)$ and $B=\left(x_{B}, y_{B}\right)$ is defined as $d(A, B)=$ $\left|x_{A}-x_{B}\right|+\left|y_{A}-y_{B}\right|$. Given some $s>0$ and points $A=\left(x_{A}, y_{A}\right)$ and $B=\left(x_{B}, y_{B}\right)$, define the taxicab ellipse with foci $A=\left(x_{A}, y_{A}\right)$ and $B=\left(x_{B}, y_{B}\right)$ to be the set of points $\{Q \mid d(A, Q)+d(B, Q)=s\}$. Compute the area enclosed by the taxicab ellipse with foci $(0,5)$ and $(12,0)$, passing through $(1,-1)$.
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$.
A multiplicative partition of a positive integer $n \geq 2$ is a way of writing $n$ as a product of one or more integers, each greater than 1. Note that we consider a positive integer to be a multiplicative partition of itself. Also, the order of the factors in a partition does not matter; for example, $2 \times 3 \times 5$ and $2 \times 5 \times 3$ are considered to be the same partition of 30 . For each positive integer $n \geq 2$, define $P(n)$ to be the number of multiplicative partitions of $n$. We also define $P(1)=1$. Note that $P(40)=7$, since the multiplicative partitions of 40 are $40,2 \times 20,4 \times 10$, $5 \times 8,2 \times 2 \times 10,2 \times 4 \times 5$, and $2 \times 2 \times 2 \times 5$.

(In each part, we use "partition" to mean "multiplicative partition". We also call the numbers being multiplied together in a given partition the "parts" of the partition.)
Determine the value of $P(1000)$.
The square $A R M L$ is contained in the $x y$-plane with $A=(0,0)$ and $M=(1,1)$. Compute the length of the shortest path from the point $(2 / 7,3 / 7)$ to itself that touches three of the four sides of square $A R M L$.
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{*}
$$
Let $T=19$. The first two terms of a sequence are $a_{1}=3 / 5$ and $a_{2}=4 / 5$. For $n>2$, if $n$ is odd, then $a_{n}=a_{n-1}^{2}-a_{n-2}^{2}$, while if $n$ is even, then $a_{n}=2 a_{n-2} a_{n-3}$. Compute the sum of the squares of the first $T-3$ terms of the sequence.
Given quadrilateral $A R M L$ with $A R=20, R M=23, M L=25$, and $A M=32$, compute the number of different integers that could be the perimeter of $A R M L$.
A cube has edges of length $n$, where $n$ is an integer. Three faces, meeting at a corner, are painted red. The cube is then cut into $n^{3}$ smaller cubes of unit length. If exactly 125 of these cubes have no faces painted red, determine the value of $n$.
Compute the least positive integer $n$ such that the sum of the digits of $n$ is five times the sum of the digits of $(n+2019)$.
$$

\begin{array}{ll}

g=9.8 \mathrm{~N} / \mathrm{kg} & G=6.67 \times 10^{-11} \mathrm{~N} \cdot \mathrm{m}^{2} / \mathrm{kg}^{2} \\

k=1 / 4 \pi \epsilon_{0}=8.99 \times 10^{9} \mathrm{~N} \cdot \mathrm{m}^{2} / \mathrm{C}^{2} & k_{\mathrm{m}}=\mu_{0} / 4 \pi=10^{-7} \mathrm{~T} \cdot \mathrm{m} / \mathrm{A} \\

c=3.00 \times 10^{8} \mathrm{~m} / \mathrm{s} & k_{\mathrm{B}}=1.38 \times 10^{-23} \mathrm{~J} / \mathrm{K} \\

N_{\mathrm{A}}=6.02 \times 10^{23}(\mathrm{~mol})^{-1} & R=N_{\mathrm{A}} k_{\mathrm{B}}=8.31 \mathrm{~J} /(\mathrm{mol} \cdot \mathrm{K}) \\

\sigma=5.67 \times 10^{-8} \mathrm{~J} /\left(\mathrm{s} \cdot \mathrm{m}^{2} \cdot \mathrm{K}^{4}\right) & e=1.602 \times 10^{-19} \mathrm{C} \\

1 \mathrm{eV}=1.602 \times 10^{-19} \mathrm{~J} & h=6.63 \times 10^{-34} \mathrm{~J} \cdot \mathrm{s}=4.14 \times \\

m_{e}=9.109 \times 10^{-31} \mathrm{~kg}=0.511 \mathrm{MeV} / \mathrm{c}^{2} & (1+x)^{n} \approx 1+n x \text { for }|x| \ll 1 \\

\sin \theta \approx \theta-\frac{1}{6} \theta^{3} \text { for }|\theta| \ll 1 & \cos \theta \approx 1-\frac{1}{2} \theta^{2} \text { for }|\theta| \ll 1

\end{array}

$$


$$

\begin{array}{lrr}

M_{\odot} & = & 1.989 \times 10^{30} \mathrm{~kg} \\

L_{\odot} & = & 3.828 \times 10^{26} \mathrm{~W} \\

R_{\text {earth }} & = & 1.5 \times 10^{11} \mathrm{~m} \\

\lambda_{\max } & = & 500 \mathrm{~nm}

\end{array}

$$

Context question:
a. Suppose you drop a block of mass $m$ vertically onto a fixed ramp with angle $\theta$ with coefficient of static and kinetic friction $\mu$. The block is dropped in such a way that it does not rotate after colliding with the ramp. Throughout this problem, assume the time of the collision is negligible.


i. Suppose the block's speed just before it hits the ramp is $v$ and the block slides down the ramp immediately after impact. What is the speed of the block right after the collision?
Context answer:
\boxed{$u=v(\sin \theta-\mu \cos \theta)$}

ii. What is the minimum $\mu$ such that the speed of the block right after the collision is 0 ?
Spheres centered at points $P, Q, R$ are externally tangent to each other, and are tangent to plane $\mathcal{M}$ at points $P^{\prime}, Q^{\prime}, R^{\prime}$, respectively. All three spheres are on the same side of the plane. If $P^{\prime} Q^{\prime}=Q^{\prime} R^{\prime}=12$ and $P^{\prime} R^{\prime}=6$, compute the area of $\triangle P Q R$.
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)$ ?
Compute the smallest positive integer $n$ such that $n^{n}$ has at least 1,000,000 positive divisors.
Van der Waals equation of state

In a well-known model of an ideal gas, whose equation of state obeys the Clapeyron-Mendeleev law, the following important physical effects are neglected. First, molecules of a real gas have a finite size and, secondly, they interact with one another. In all parts of this problem one mole of water is considered.

Part A. Non-ideal gas equation of state

Taking into account the finite size of the molecules, the gaseous equation of state takes the form

$$
P(V-b)=R T
\tag{1}
$$

where $P, V, T$ stands for the gas pressure, its volume per mole and temperature, respectively, $R$ denotes the universal gas constant, and $b$ is a specific constant extracting some volume.

A1 Estimate $b$ and express it in terms of the diameter of the molecules $d$.
Let $A B C$ be an acute triangle, and let $M$ be the midpoint of $A C$. A circle $\omega$ passing through $B$ and $M$ meets the sides $A B$ and $B C$ again at $P$ and $Q$, respectively. Let $T$ be the point such that the quadrilateral $B P T Q$ is a parallelogram. Suppose that $T$ lies on the circumcircle of the triangle $A B C$. Determine all possible values of $B T / B M$.
Compute the largest prime divisor of $15 !-13$ !.
A regular hexagon has side length 1. Compute the average of the areas of the 20 triangles whose vertices are vertices of the hexagon.
Diagonal $W Y$ of square $W X Y Z$ has slope 2. Determine the sum of the slopes of $W X$ and $X Y$.
$A \pm 1 \text{-}sequence$ is a sequence of 2022 numbers $a_{1}, \ldots, a_{2022}$, each equal to either +1 or -1 . Determine the largest $C$ so that, for any $\pm 1 -sequence$, there exists an integer $k$ and indices $1 \leqslant t_{1}<\ldots<t_{k} \leqslant 2022$ so that $t_{i+1}-t_{i} \leqslant 2$ for all $i$, and

$$
\left|\sum_{i=1}^{k} a_{t_{i}}\right| \geqslant C
$$
The $n$th term of an arithmetic sequence is given by $t_{n}=555-7 n$.

If $S_{n}=t_{1}+t_{2}+\ldots+t_{n}$, determine the smallest value of $n$ for which $S_{n}<0$.
For each positive real number $x$, define $f(x)$ to be the number of prime numbers $p$ that satisfy $x \leq p \leq x+10$. What is the value of $f(f(20))$ ?
Define the sequence of positive integers $\left\{a_{n}\right\}$ as follows:

$$
\left\{\begin{array}{l}
a_{1}=1 \\
\text { for } n \geq 2, a_{n} \text { is the smallest possible positive value of } n-a_{k}^{2}, \text { for } 1 \leq k<n .
\end{array}\right.
$$

For example, $a_{2}=2-1^{2}=1$, and $a_{3}=3-1^{2}=2$. Compute $a_{1}+a_{2}+\cdots+a_{50}$.
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)$.
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.
If $\cos \theta=\tan \theta$, determine all possible values of $\sin \theta$, giving your answer(s) as simplified exact numbers.