Navvye/Olympiad-Problems-CSV huggingface dataset:
Problem: Find the number of triples of nonnegative integers \((a,b,c)\) satisfying \(a + b + c = 300\) and
\begin{equation*}
a^2b + a^2c + b^2a + b^2c + c^2a + c^2b = 6,000,000.
\end{equation*}

Solution: We have
\begin{align*}
& a^2 b + a^2 c + b^2 a + b^2 c + c^2 a + c^2 b \\
& = ab \left( a + b \right) + bc \left( b + c \right) + ca \left( c + a \right) \\
& = ab \left( 300 - c \right) + bc \left( 300 - a \right) + ca \left( 300 - b \right) \\
& = 300 \left( ab + bc + ca \right) - 3 abc \\
& = -3 \left(
\left( a - 100 \right) \left( b - 100 \right) \left( c - 100 \right)
- 10^4 \left( a + b + c \right) + 10^6
\right) \\
& = -3 \left(
\left( a - 100 \right) \left( b - 100 \right) \left( c - 100 \right)
- 2 \cdot  10^6
\right) \\
& = 6 \cdot 10^6 .
\end{align*}
The first and the fifth equalities follow from the condition that $a+b+c = 300$
Therefore,
\[
\left( a - 100 \right) \left( b - 100 \right) \left( c - 100 \right) = 0 .
\]
Case 1: Exactly one out of $a - 100$ $b - 100$ $c - 100$ is equal to 0.
Step 1: We choose which term is equal to 0. The number ways is 3.
Step 2: For the other two terms that are not 0, we count the number of feasible solutions.
W.L.O.G, we assume we choose $a - 100 = 0$ in Step 1. In this step, we determine $b$ and $c$
Recall $a + b + c = 300$ . Thus, $b + c = 200$ .
Because $b$ and $c$ are nonnegative integers and $b - 100 \neq 0$ and $c - 100 \neq 0$ , the number of solutions is 200.
Following from the rule of product, the number of solutions in this case is $3 \cdot 200 = 600$
Case 2: At least two out of $a - 100$ $b - 100$ $c - 100$ are equal to 0.
Because $a + b + c = 300$ , we must have $a = b = c = 100$
Therefore, the number of solutions in this case is 1.
Putting all cases together, the total number of solutions is $600 + 1 = \boxed{601}$

Answer:  601
Problem: Find the number of triples of nonnegative integers \((a,b,c)\) satisfying \(a + b + c = 300\) and
\begin{equation*}
a^2b + a^2c + b^2a + b^2c + c^2a + c^2b = 6,000,000.
\end{equation*}

Solution: We will use Vieta's formulas to solve this problem. We assume $a + b + c = 300$ $ab + bc + ca = m$ , and $abc = n$ . Thus $a$ $b$ $c$ are the three roots of a cubic polynomial $f(x)$
We note that $300m = (a + b + c)(ab + bc + ca)=\sum_{cyc} a^2b + 3abc = 6000000 + 3n$ , which simplifies to $100m - 2000000 = n$
Our polynomial $f(x)$ is therefore equal to $x^3 - 300x^2 + mx - (100m - 2000000)$ . Note that $f(100) = 0$ , and by polynomial division we obtain $f(x) = (x - 100)(x^2 - 200x - (m-20000))$
We now notice that the solutions to the quadratic equation above are $x = 100 \pm \frac{\sqrt{200^2 - 4(m - 20000)}}{2} = 100 \pm \sqrt{90000 - 4m}$ , and that by changing the value of $m$ we can let the roots of the equation be any pair of two integers which sum to $200$ . Thus any triple in the form $(100, 100 - x, 100 + x)$ where $x$ is an integer between $0$ and $100$ satisfies the conditions.
Now to count the possible solutions, we note that when $x \ne 100$ , the three roots are distinct; thus there are $3! = 6$ ways to order the three roots. As we can choose $x$ from $0$ to $99$ , there are $100 \cdot 3! = 600$ triples in this case. When $x = 100$ , all three roots are equal to $100$ , and there is only one triple in this case.
In total, there are thus $\boxed{601}$ distinct triples.

Answer:  601
Problem: Find the number of triples of nonnegative integers \((a,b,c)\) satisfying \(a + b + c = 300\) and
\begin{equation*}
a^2b + a^2c + b^2a + b^2c + c^2a + c^2b = 6,000,000.
\end{equation*}

Solution: Let's define $a=100+x$ $b=100+y$ $c=100+z$ . Then we have $x+y+z=0$ and $6000000 = \sum a^2(b+c)$
$= \sum (100+x)^2(200-x) = \sum (10000+200x+x^2)(200-x) = \sum (20000 - 10000 x + x(40000-x^2))$
$= \sum (20000 + 30000 x -x^3) = 6000000 - \sum x^3$ , so we get $x^3 + y^3 + z^3 = 0$ . Then from $x+y+z = 0$ , we can find $0 = x^3+y^3+z^3 = x^3+y^3-(x+y)^3 = 3xyz$ , which means that one of $a$ $b$ $c$ must be 0. There are 201 solutions for each of $a=0$ $b=0$ and $c=0$ , and subtract the overcounting of 2 for solution $(200, 200, 200)$ , the final result is $201 \times 3 - 2 = \boxed{601}$

Answer:  601
Problem: Let \(O=(0,0)\), \(A=\left(\tfrac{1}{2},0\right)\), and \(B=\left(0,\tfrac{\sqrt{3}}{2}\right)\) be points in the coordinate plane. Let \(\mathcal{F}\) be the family of segments \(\overline{PQ}\) of unit length lying in the first quadrant with \(P\) on the \(x\)-axis and \(Q\) on the \(y\)-axis. There is a unique point \(C\) on \(\overline{AB}\), distinct from \(A\) and \(B\),  that does not belong to any segment from \(\mathcal{F}\) other than \(\overline{AB}\). Then \(OC^2=\tfrac{p}{q}\), where \(p\) and \(q\) are relatively prime positive integers. Find \(p+q\).

Solution: By Furaken [asy] pair O=(0,0); pair X=(1,0); pair Y=(0,1); pair A=(0.5,0); pair B=(0,sin(pi/3)); dot(O); dot(X); dot(Y); dot(A); dot(B); draw(X--O--Y); draw(A--B); label("$B'$", B, W); label("$A'$", A, S); label("$O$", O, SW); pair C=(1/8,3*sqrt(3)/8); dot(C); pair D=(1/8,0); dot(D); pair E=(0,3*sqrt(3)/8); dot(E); label("$C$", C, NE); label("$D$", D, S); label("$E$", E, W); draw(D--C--E); [/asy]
Let $C = (\tfrac18,\tfrac{3\sqrt3}8)$ This is sus, furaken randomly guessed C and proceeded to prove it works Draw a line through $C$ intersecting the $x$ -axis at $A'$ and the $y$ -axis at $B'$ . We shall show that $A'B' \ge 1$ , and that equality only holds when $A'=A$ and $B'=B$
Let $\theta = \angle OA'C$ . Draw $CD$ perpendicular to the $x$ -axis and $CE$ perpendicular to the $y$ -axis as shown in the diagram. Then \[8A'B' = 8CA' + 8CB' = \frac{3\sqrt3}{\sin\theta} + \frac{1}{\cos\theta}\] By some inequality (I forgot its name), \[\left(\frac{3\sqrt3}{\sin\theta} + \frac{1}{\cos\theta}\right) \cdot \left(\frac{3\sqrt3}{\sin\theta} + \frac{1}{\cos\theta}\right) \cdot (\sin^2\theta + \cos^2\theta) \ge (3+1)^3 = 64\] We know that $\sin^2\theta + \cos^2\theta = 1$ . Thus $\tfrac{3\sqrt3}{\sin\theta} + \tfrac{1}{\cos\theta} \ge 8$ . Equality holds if and only if \[\frac{3\sqrt3}{\sin\theta} : \frac{1}{\cos\theta} = \frac{3\sqrt3}{\sin\theta} : \frac{1}{\cos\theta} = \sin^2\theta : \cos^2\theta\] which occurs when $\theta=\tfrac\pi3$ . Guess what, $\angle OAB$ happens to be $\tfrac\pi3$ , thus $A'=A$ and $B'=B$ . Thus, $AB$ is the only segment in $\mathcal{F}$ that passes through $C$ . Finally, we calculate $OC^2 = \tfrac1{64} + \tfrac{27}{64} = \tfrac7{16}$ , and the answer is $\boxed{023}$ .
~Furaken

Answer:  023
Problem: Let \(O=(0,0)\), \(A=\left(\tfrac{1}{2},0\right)\), and \(B=\left(0,\tfrac{\sqrt{3}}{2}\right)\) be points in the coordinate plane. Let \(\mathcal{F}\) be the family of segments \(\overline{PQ}\) of unit length lying in the first quadrant with \(P\) on the \(x\)-axis and \(Q\) on the \(y\)-axis. There is a unique point \(C\) on \(\overline{AB}\), distinct from \(A\) and \(B\),  that does not belong to any segment from \(\mathcal{F}\) other than \(\overline{AB}\). Then \(OC^2=\tfrac{p}{q}\), where \(p\) and \(q\) are relatively prime positive integers. Find \(p+q\).

Solution: $y=-(\tan \theta) x+\sin \theta=-\sqrt{3}x+\frac{\sqrt{3}}{2}, x=\frac{\sqrt{3}-2\sin \theta}{2\sqrt{3}-2\tan \theta}$
Now, we want to find $\lim_{\theta\to\frac{\pi}{3}}\frac{\sqrt{3}-2\sin \theta}{2\sqrt{3}-2\tan \theta}$ . By L'Hôpital's rule, we get $\lim_{\theta\to\frac{\pi}{3}}\frac{\sqrt{3}-2\sin \theta}{2\sqrt{3}-2\tan \theta}=\lim_{\theta\to\frac{\pi}{3}}cos^3{x}=\frac{1}{8}$ . This means that $y=\frac{3\sqrt{3}}{8}\implies OC^2=\frac{7}{16}$ , so we get $\boxed{023}$

Answer:  023
Problem: Let \(O=(0,0)\), \(A=\left(\tfrac{1}{2},0\right)\), and \(B=\left(0,\tfrac{\sqrt{3}}{2}\right)\) be points in the coordinate plane. Let \(\mathcal{F}\) be the family of segments \(\overline{PQ}\) of unit length lying in the first quadrant with \(P\) on the \(x\)-axis and \(Q\) on the \(y\)-axis. There is a unique point \(C\) on \(\overline{AB}\), distinct from \(A\) and \(B\),  that does not belong to any segment from \(\mathcal{F}\) other than \(\overline{AB}\). Then \(OC^2=\tfrac{p}{q}\), where \(p\) and \(q\) are relatively prime positive integers. Find \(p+q\).

Solution: The equation of line $AB$ is \[ y = \frac{\sqrt{3}}{2} x - \sqrt{3} x.  \hspace{1cm} (1) \]
The position of line $PQ$ can be characterized by $\angle QPO$ , denoted as $\theta$ .
Thus, the equation of line $PQ$ is
\[ y = \sin \theta - \tan \theta \cdot x . \hspace{1cm} (2) \]
Solving (1) and (2), the $x$ -coordinate of the intersecting point of lines $AB$ and $PQ$ satisfies the following equation:
\[ \frac{\frac{\sqrt{3}}{2} - \sqrt{3} x}{\sin \theta} + \frac{x}{\cos \theta} = 1 . \hspace{1cm} (1) \]
We denote the L.H.S. as $f \left( \theta; x \right)$
We observe that $f \left( 60^\circ ; x \right) = 1$ for all $x$ .
Therefore, the point $C$ that this problem asks us to find can be equivalently stated in the following way:
We interpret Equation (1) as a parameterized equation that $x$ is a tuning parameter and $\theta$ is a variable that shall be solved and expressed in terms of $x$ .
In Equation (1), there exists a unique $x \in \left( 0, 1 \right)$ , denoted as $x_C$ $x$ -coordinate of point $C$ ), such that the only solution is $\theta = 60^\circ$ . For all other $x \in \left( 0, 1 \right) \backslash \{ x_C \}$ , there are more than one solutions with one solution $\theta = 60^\circ$ and at least another solution.
Given that function $f \left( \theta ; x \right)$ is differentiable, the above condition is equivalent to the first-order-condition \[ \frac{\partial f \left( \theta ; x_C \right) }{\partial \theta} \bigg|_{\theta = 60^\circ} = 0 . \]
Calculating derivatives in this equation, we get \[ - \left( \frac{\sqrt{3}}{2} - \sqrt{3} x_C \right) \frac{\cos 60^\circ}{\sin^2 60^\circ} + x_C \frac{\sin 60^\circ}{\cos^2 60^\circ} = 0. \]
By solving this equation, we get \[ x_C = \frac{1}{8} . \]
Plugging this into Equation (1), we get the $y$ -coordinate of point $C$ \[ y_C = \frac{3 \sqrt{3}}{8} . \]
Therefore,
\begin{align*}
OC^2 & = x_C^2 + y_C^2 \\
& = \frac{7}{16} .
\end{align*}
Therefore, the answer is $7 + 16 = \boxed{23}$

Answer:  23
Problem: Let \(O=(0,0)\), \(A=\left(\tfrac{1}{2},0\right)\), and \(B=\left(0,\tfrac{\sqrt{3}}{2}\right)\) be points in the coordinate plane. Let \(\mathcal{F}\) be the family of segments \(\overline{PQ}\) of unit length lying in the first quadrant with \(P\) on the \(x\)-axis and \(Q\) on the \(y\)-axis. There is a unique point \(C\) on \(\overline{AB}\), distinct from \(A\) and \(B\),  that does not belong to any segment from \(\mathcal{F}\) other than \(\overline{AB}\). Then \(OC^2=\tfrac{p}{q}\), where \(p\) and \(q\) are relatively prime positive integers. Find \(p+q\).

Solution: Let $s$ be a segment in $\mathcal{F}$ with x-intercept $a$ and y-intercept $b$ . We can write $s$ as
\begin{align*}
\frac{x}{a} + \frac{y}{b} &= 1 \\
y &= b(1 - \frac{x}{a}).
\end{align*}
Let the unique point in the first quadrant $(x, y)$ lie on $s$ and no other segment in $\mathcal{F}$ . We can find $x$ by solving \[b(1 - \frac{x}{a}) = (b + db)(1 - \frac{x}{a + da})\] and taking the limit as $da, db \to 0$ . Since $s$ has length $1$ $a^2 + b^2 = 1^2$ by the Pythagorean theorem. Solving this for $db$ , we get
\begin{align*}
a^2 + b^2 &= 1 \\
b^2 &= 1 - a^2 \\
\frac{db^2}{da} &= \frac{d(1 - a^2)}{da} \\
2a\frac{db}{da} &= -2a \\
db &= -\frac{a}{b}da.
\end{align*}
After we substitute $db = -\frac{a}{b}da$ , the equation for $x$ becomes \[b(1 - \frac{x}{a}) = (b -\frac{a}{b} da)(1 - \frac{x}{a + da}).\]
In $\overline{AB}$ $a = \frac{1}{2}$ and $b = \frac{\sqrt{3}}{2}$ . To find the x-coordinate of $C$ , we substitute these into the equation for $x$ and get
\begin{align*}
\frac{\sqrt{3}}{2}(1 - \frac{x}{\frac{1}{2}}) &= (\frac{\sqrt{3}}{2} - \frac{\frac{1}{2}}{\frac{\sqrt{3}}{2}} da)(1 - \frac{x}{\frac{1}{2} + da}) \\
\frac{\sqrt{3}}{2}(1 - 2x) &= (\frac{\sqrt{3}}{2} - \frac{da}{\sqrt{3}})(1 - \frac{x}{\frac{1 + 2da}{2}}) \\
\frac{\sqrt{3}}{2} - \sqrt{3}x &= \frac{3 - 2da}{2\sqrt{3}}(1 - \frac{2x}{1 + 2da}) \\
\frac{\sqrt{3}}{2} - \sqrt{3}x &= \frac{3 - 2da}{2\sqrt{3}} \cdot \frac{1 + 2da - 2x}{1 + 2da} \\
\frac{\sqrt{3}}{2} - \sqrt{3}x &= \frac{3 + 6da - 6x - 2da - 4da^2 + 4xda}{2\sqrt{3} + 4\sqrt{3}da} \\
(\frac{\sqrt{3}}{2} - \sqrt{3}x)(2\sqrt{3} + 4\sqrt{3}da) &= 3 + 6da - 6x - 2da - 4da^2 + 4xda \\
3 + 6da - 6x - 12xda &= 3 + 4da - 6x - 4da^2 + 4xda \\
2da &= -4da^2 + 16xda \\
16xda &= 2da + 4da^2 \\
x &= \frac{da + 2da^2}{8da}.
\end{align*}
We take the limit as $da \to 0$ to get \[x = \lim_{da \to 0} \frac{da + 2da^2}{8da} = \lim_{da \to 0} \frac{1 + 2da}{8} = \frac{1}{8}.\] We substitute $x = \frac{1}{8}$ into the equation for $\overline{AB}$ to find the y-coordinate of $C$ \[y = b(1 - \frac{x}{a}) = \frac{\sqrt{3}}{2}(1 - \frac{\frac{1}{8}}{\frac{1}{2}}) = \frac{3\sqrt{3}}{8}.\] The problem asks for \[OC^2 = x^2 + y^2 = (\frac{1}{8})^2 + (\frac{3\sqrt{3}}{8})^2 = \frac{7}{16} = \frac{p}{q},\] so $p + q = 7 + 16 = \boxed{023}$

Answer:  023
Problem: Let \(O=(0,0)\), \(A=\left(\tfrac{1}{2},0\right)\), and \(B=\left(0,\tfrac{\sqrt{3}}{2}\right)\) be points in the coordinate plane. Let \(\mathcal{F}\) be the family of segments \(\overline{PQ}\) of unit length lying in the first quadrant with \(P\) on the \(x\)-axis and \(Q\) on the \(y\)-axis. There is a unique point \(C\) on \(\overline{AB}\), distinct from \(A\) and \(B\),  that does not belong to any segment from \(\mathcal{F}\) other than \(\overline{AB}\). Then \(OC^2=\tfrac{p}{q}\), where \(p\) and \(q\) are relatively prime positive integers. Find \(p+q\).

Solution: [asy] pair O=(0,0); pair X=(1,0); pair Y=(0,1); pair A=(0.5,0); pair B=(0,sin(pi/3)); pair A1=(0.6,0); pair B1=(0,0.8); pair A2=(0.575,0.04); pair B2=(0.03,0.816); dot(O); dot(X); dot(Y); dot(A); dot(B); dot(A1); dot(B1); dot(A2); dot(B2); draw(X--O--Y); draw(A--B); draw(A1--B1); draw(A--A2); draw(B1--B2); label("$B$", B, W); label("$A$", A, S); label("$B_1$", B1, SW); label("$A_1$", A1, S); label("$B_2$", B2, E); label("$A_2$", A2, NE); label("$O$", O, SW); pair C=(0.18,0.56); label("$C$", C, E); dot(C); [/asy]
Let's move a little bit from $A$ to $A_1$ , then $B$ must move to $B_1$ to keep $A_1B_1 = 1$ $AB$ intersects with $A_1B_1$ at $C$ . Pick points $A_2$ and $B_2$ on $CA_1$ and $CB$ such that $CA_2 = CA$ $CB_2 = CB_1$ , we have $A_1A_2 = BB_2$ . Since $AA_1$ is very small, $\angle CA_1A \approx 60^\circ$ $\angle CBB_1 \approx 30^\circ$ , so $AA_2\approx \sqrt{3}A_1A_2$ $B_1B_2 \approx \frac{1}{\sqrt{3}}BB_2$ , by similarity, $\frac{CA}{CB} \approx \frac{CA}{CB_2} = \frac{AA_2}{B_1B_2} = \frac{\sqrt{3}A_1A_2}{\frac{1}{\sqrt{3}}BB_2} = 3$ . So the coordinates of $C$ is $\left(\frac{1}{8}, \frac{3\sqrt{3}}{8}\right)$
so $OC^2 = \frac{1}{64} + \frac{27}{64} = \frac{7}{16}$ , the answer is $\boxed{023}$

Answer:  023
Problem: Let $\omega\neq 1$ be a 13th root of unity. Find the remainder when \[\prod_{k=0}^{12}(2-2\omega^k+\omega^{2k})\] is divided by 1000.

Solution: \[\prod_{k=0}^{12} \left(2- 2\omega^k + \omega^{2k}\right) = \prod_{k=0}^{12} \left((1 - \omega^k)^2 + 1\right) = \prod_{k=0}^{12} \left((1 + i) - \omega^k)((1 - i) - \omega^k\right)\]
Now, we consider the polynomial $x^{13} - 1$ whose roots are the 13th roots of unity. Taking our rewritten product from $0$ to $12$ , we see that both instances of $\omega^k$ cycle through each of the 13th roots. Then, our answer is:
\[((1 + i)^{13} - 1)(1 - i)^{13} - 1)\]
\[= (-64(1 + i) - 1)(-64(1 - i) - 1)\]
\[= (65 + 64i)(65 - 64i)\]
\[= 65^2 + 64^2\]
\[= 8\boxed{321}\]

Answer:  321
Problem: Let $\omega\neq 1$ be a 13th root of unity. Find the remainder when \[\prod_{k=0}^{12}(2-2\omega^k+\omega^{2k})\] is divided by 1000.

Solution: To find $\prod_{k=0}^{12} (2 - 2w^k + w^{2k})$ , where $w\neq1$ and $w^{13}=1$ , rewrite this is as
$(r-w)(s-w)(r-w^2)(s-w^2)...(r-w^{12})(s-w^{12})$ where $r$ and $s$ are the roots of the quadratic $x^2-2x+2=0$
Grouping the $r$ 's and $s$ 's results in $\frac{r^{13}-1}{r-1} \cdot\frac{s^{13}-1}{s-1}$
the denomiator $(r-1)(s-1)=1$ by vietas.
the numerator $(rs)^{13} - (r^{13} + s^{13}) + 1 = 2^{13} - (-128) + 1= 8321$ by newtons sums
so the answer is $\boxed{321}$

Answer:  321
Problem: Let $\omega\neq 1$ be a 13th root of unity. Find the remainder when \[\prod_{k=0}^{12}(2-2\omega^k+\omega^{2k})\] is divided by 1000.

Solution: Denote $r_j = e^{\frac{i 2 \pi j}{13}}$ for $j \in \left\{ 0, 1, \cdots , 12 \right\}$
Thus, for $\omega \neq 1$ $\left( \omega^0, \omega^1, \cdots, \omega^{12} \right)$ is a permutation of $\left( r_0, r_1, \cdots, r_{12} \right)$
We have
\begin{align*}\
\Pi_{k = 0}^{12} \left( 2 - 2 \omega^k + \omega^{2k} \right)
& = \Pi_{k=0}^{12} \left( 1 + i - \omega^k \right)
\left( 1 - i - \omega^k \right) \\
& = \Pi_{k=0}^{12} \left( \sqrt{2} e^{i \frac{\pi}{4}} - \omega^k \right)
\left( \sqrt{2} e^{-i \frac{\pi}{4}} - \omega^k \right) \\
& = \Pi_{k=0}^{12} \left( \sqrt{2} e^{i \frac{\pi}{4}} - r_k \right)
\left( \sqrt{2} e^{-i \frac{\pi}{4}} - r_k \right) \\
& = \left(
\Pi_{k=0}^{12} \left( \sqrt{2} e^{i \frac{\pi}{4}} - r_k \right)
\right)
\left(
\Pi_{k=0}^{12} \left( \sqrt{2} e^{-i \frac{\pi}{4}} - r_k \right)
\right) . \hspace{1cm} (1)
\end{align*}
The third equality follows from the above permutation property.
Note that $r_0, r_1, \cdots , r_{12}$ are all zeros of the polynomial $z^{13} - 1$ .
Thus, \[ z^{13} - 1 = \Pi_{k=0}^{12} \left( z - r_k \right) . \]
Plugging this into Equation (1), we get
\begin{align*}
(1)
& = \left( \left( \sqrt{2} e^{i \frac{\pi}{4}} \right)^{13} - 1 \right)
\left( \left( \sqrt{2} e^{-i \frac{\pi}{4}} \right)^{13} - 1 \right) \\
& = \left( - 2^{13/2} e^{i \frac{\pi}{4}} - 1 \right)
\left( - 2^{13/2} e^{-i \frac{\pi}{4}} - 1 \right) \\
& = 2^{13} + 1 + 2^{13/2} \cdot 2 \cos \frac{\pi}{4} \\
& = 2^{13} + 1 + 2^7 \\
& = 8321 .
\end{align*}
Therefore, the answer is $\boxed{321}$

Answer:  321
Problem: Let \(b\ge 2\) be an integer. Call a positive integer \(n\) \(b\text-\textit{eautiful}\) if it has exactly two digits when expressed in base \(b\)  and these two digits sum to \(\sqrt n\). For example, \(81\) is \(13\text-\textit{eautiful}\) because \(81  = \underline{6} \ \underline{3}_{13} \) and \(6 + 3 =  \sqrt{81}\). Find the least integer \(b\ge 2\) for which there are more than ten \(b\text-\textit{eautiful}\) integers.

Solution: We write the base- $b$ two-digit integer as $\left( xy \right)_b$ .
Thus, this number satisfies \[ \left( x + y \right)^2 = b x + y \] with $x \in \left\{ 1, 2, \cdots , b-1 \right\}$ and $y \in \left\{ 0, 1, \cdots , b - 1 \right\}$
The above conditions imply $\left( x + y \right)^2 < b^2$ . Thus, $x + y \leq b - 1$
The above equation can be reorganized as \[ \left( x + y \right) \left( x + y - 1 \right) = \left( b - 1 \right) x . \]
Denote $z = x + y$ and $b' = b - 1$ .
Thus, we have \[ z \left( z - 1 \right) = b' x , \hspace{1cm} (1) \] where $z \in \left\{ 2, 3, \cdots , b' \right\}$ and $x \in \left\{ 1, 2, \cdots , b' \right\}$
Next, for each $b'$ , we solve Equation (1).
We write $b'$ in the prime factorization form as $b' = \Pi_{i=1}^n p_i^{k_i}$ .
Let $\left(A, \bar A \right)$ be any ordered partition of $\left\{ 1, 2, \cdots , n \right\}$ (we allow one set to be empty).
Denote $P_A = \Pi_{i \in A} p_i^{k_i}$ and $P_{\bar A} = \Pi_{i \in \bar A} p_i^{k_i}$
Because ${\rm gcd} \left( z, z-1 \right) = 1$ , there must exist such an ordered partition, such that $P_A | z$ and $P_{\bar A} | z-1$
Next, we prove that for each ordered partition $\left( A, \bar A \right)$ , if a solution of $z$ exists, then it must be unique.
Suppose there are two solutions of $z$ under partition $\left( A, \bar A \right)$ $z_1 = c_1 P_A$ $z_1 - 1 = d_1 P_{\bar A}$ , and $z_2 = c_2 P_A$ $z_2 - 1 = d_2 P_{\bar A}$ .
W.L.O.G., assume $c_1 < c_2$ .
Hence, we have \[ \left( c_2 - c_1 \right) P_A = \left( d_2 - d_1 \right) P_{\bar A} . \]
Because ${\rm gcd} \left( P_A, P_{\bar A} \right) = 1$ and $c_1 < c_2$ , there exists a positive integer $m$ , such that $c_2 = c_1 + m P_{\bar A}$ and $d_2 = d_1 + m P_A$ .
Thus,
\begin{align*}
z_2 & = z_1 + m P_A P_{\bar A} \\
& = z_1 + m b' \\
& > b' .
\end{align*}
However, recall $z_2 \leq b'$ . We get a contradiction.
Therefore, under each ordered partition for $b'$ , the solution of $z$ is unique.
Note that if $b'$ has $n$ distinct prime factors, the number of ordered partitions is $2^n$ .
Therefore, to find a $b'$ such that the number of solutions of $z$ is more than 10, the smallest $n$ is 4.
With $n = 4$ , the smallest number is $2 \cdot 3 \cdot 5 \cdot 7 = 210$ .
Now, we set $b' = 210$ and check whether the number of solutions of $z$ under this $b'$ is more than 10.
We can easily see that all ordered partitions (except $A = \emptyset$ ) guarantee feasible solutions of $z$ .
Therefore, we have found a valid $b'$ .
Therefore, $b = b' + 1 = \boxed{211}$

Answer:  211
Problem: Find the number of rectangles that can be formed inside a fixed regular dodecagon ( $12$ -gon) where each side of the rectangle lies on either a side or a diagonal of the dodecagon. The diagram below shows three of those rectangles.
[asy] unitsize(0.6 inch); for(int i=0; i<360; i+=30) { dot(dir(i), 4+black); draw(dir(i)--dir(i+30)); } draw(dir(120)--dir(330)); filldraw(dir(210)--dir(240)--dir(30)--dir(60)--cycle, mediumgray, linewidth(1.5)); draw((0,0.366)--(0.366,0), linewidth(1.5)); [/asy]

Solution: Using the same diagram as Solution 1, we can get the number of rectangles from Case 1 by adding the number of rectangles of $A_2$ $A_8$ $A_8$ $A_{10}$ and $A_1$ $A_5$ $A_7$ $A_{11}$ and then subtracting the overlaps,
\[\binom{5}{2}\binom{3}{2} + \binom{5}{2}\binom{3}{2} - \binom{3}{2}\binom{3}{2}\] \[=51\]
We multiply this by 3 to get the total number of rectangles for Case 1, which is 153.
For Case 2, we can first get the total number of rectangles from $A_2A_3A_4A_5A_8A_9A_{10}A_{11}$ then add $A_1A_6A_7A_{12}$ and subtract by the overlaps, \[\binom{4}{2}\binom{4}{2} + \binom{6}{2} - \binom{4}{2} + \binom{6}{2} - \binom{4}{2}\] \[= 54\] Multiply that by 3 and add it to Case 1 to get $\boxed{315}$

Answer:  315
Problem: Five men and nine women stand equally spaced around a circle in random order. The probability that every man stands diametrically opposite a woman is $\frac{m}{n},$ where $m$ and $n$ are relatively prime positive integers. Find $m+n.$

Solution: For simplicity purposes, we consider two arrangements different even if they only differ by rotations or reflections. In this way, there are $14!$ arrangements without restrictions.
First, there are $\binom{7}{5}$ ways to choose the man-woman diameters. Then, there are $10\cdot8\cdot6\cdot4\cdot2$ ways to place the five men each in a man-woman diameter. Finally, there are $9!$ ways to place the nine women without restrictions.
Together, the requested probability is \[\frac{\tbinom{7}{5}\cdot(10\cdot8\cdot6\cdot4\cdot2)\cdot9!}{14!} = \frac{21\cdot(10\cdot8\cdot6\cdot4\cdot2)}{14\cdot13\cdot12\cdot11\cdot10} = \frac{48}{143},\] from which the answer is $48+143 = \boxed{191}.$

Answer:  191
Problem: Five men and nine women stand equally spaced around a circle in random order. The probability that every man stands diametrically opposite a woman is $\frac{m}{n},$ where $m$ and $n$ are relatively prime positive integers. Find $m+n.$

Solution: We can simply just loop through each of the men and find the probability that the person opposite from him is a woman.
Start by sitting down the $1$ st man. The probability that the person opposite to him is a woman is $\frac{9}{13}$ since out of the $13$ people who can sit opposite to him, $9$ can be a woman. With the $2$ nd man, we can use the same logic: there are $11$ people who can sit opposite to him, but only $8$ of them are a woman, so the probability is $\frac{8}{11}.$ We use the same logic for the $3$ rd, $4$ th and $5$ th men to get probabilities of $\frac{7}{9}$ $\frac{6}{7}$ and $\frac{5}{5},$ respectively.
Multiplying these probabilities, we get a final answer of \[\frac{9}{13}\cdot\frac{8}{11}\cdot\frac{7}{9}\cdot\frac{6}{7}\cdot\frac{5}{5}=\frac{48}{143}\longrightarrow\boxed{191}.\]

Answer:  191