sungyub/dapo-math-17k-verl huggingface dataset:
user: Let $H$ be a regular hexagon with area 360. Three distinct vertices $X$, $Y$, and $Z$ are picked randomly, with all possible triples of distinct vertices equally likely. Let $A$, $B$, and $C$ be the unpicked vertices. What is the expected value (average value) of the area of the intersection of $\triangle ABC$ and $\triangle XYZ$?

Answer: 24
user: What is the sum of all positive integer values of $n$ that satisfy the equation:
\[
 \cos \left( \frac{\pi}{n} \right) \cos \left( \frac{2\pi}{n} \right) \cos \left( \frac{4\pi}{n} \right) \cos \left( \frac{8\pi}{n} \right) \cos \left( \frac{16\pi}{n} \right) = \frac{1}{32}?
\]

Answer: 47
user: Let $S$ be the set of integers which are both a multiple of $70$ and a factor of $630,000$. A random element $c$ of $S$ is selected. If the probability that there exists an integer $d$ with $\gcd(c, d) = 70$ and $\operatorname{lcm}(c, d) = 630,000$ is $\frac{m}{n}$ for some relatively prime integers $m$ and $n$, compute $100m + n$.

Answer: 106
user: Let $a, b, c, d$ be distinct digits such that the product of the two-digit numbers $\overline{ab}$ and $\overline{cb}$ is of the form $\overline{ddd}$. Find all possible values of $a + b + c + d$.

Answer: 21
user: In a room, there are 2019 aligned switches, each connected to a light bulb. Initially, all the light bulbs are switched on. Then, 2019 people enter the room one by one and perform the following operation: 

- The first person toggles every switch.
- The second person toggles every second switch.
- The third person toggles every third switch.
- This continues until the 2019th person toggles every 2019th switch.

Determine how many light bulbs remain switched on after all 2019 people have entered the room and completed their operations.

Answer: 1975
user: A football tournament is played between 5 teams, each pair playing exactly one match. Points are awarded as follows:
- 5 points for a victory
- 0 points for a loss
- 1 point each for a draw with no goals scored
- 2 points each for a draw with goals scored

In the final ranking, the five teams have points that are 5 consecutive numbers. Determine the least number of goals that could be scored in the tournament.

Answer: 6
user: Consider a circle centered at $O$. Parallel chords $AB$ of length $8$ and $CD$ of length $10$ are at a distance of $2$ apart such that $AC < AD$. We can write $\tan \angle BOD = \frac{a}{b}$, where $a$ and $b$ are positive integers such that $\gcd(a, b) = 1$. Compute $a + b$.

Answer: 113
user: Given triangle $ABC$ and a point $P$ inside it, $\angle BAP=18^\circ$, $\angle CAP=30^\circ$, $\angle ACP=48^\circ$, and $AP=BC$. If $\angle BCP=x^\circ$, find $x$.

Answer: 6
user: Let $P_i(x) = x^2 + b_i x + c_i$, where $i = 1, 2, \ldots, n$, be pairwise distinct polynomials of degree $2$ with real coefficients. It is given that for any $0 \le i < j \le n$, $i, j \in \mathbb{N}$, the polynomial $Q_{i,j}(x) = P_i(x) + P_j(x)$ has only one real root. Find the greatest possible value of $n$.

Answer: 3
user: Let $I$ be the incenter of a triangle $\triangle ABC$ with $AB = 20$, $BC = 15$, and $BI = 12$. Let $CI$ intersect the circumcircle $\omega_1$ of $\triangle ABC$ at $D \neq C$. Alice draws a line $l$ through $D$ that intersects $\omega_1$ on the minor arc $AC$ at $X$ and the circumcircle $\omega_2$ of $\triangle AIC$ at $Y$ outside $\omega_1$. She notices that she can construct a right triangle with side lengths $ID$, $DX$, and $XY$. Determine, with proof, the length of $IY$.

Answer: 13
user: Jon wrote the $n$ smallest perfect squares on one sheet of paper, and the $n$ smallest triangular numbers on another sheet (note that $0$ is both square and triangular). Jon notices that there are the same number of triangular numbers on the first paper as there are squares on the second paper. However, if $n$ had been one smaller, this would not have been true. If $n < 2008$, let $m$ be the greatest number Jon could have written on either paper. Find the remainder when $m$ is divided by $2008$.

Answer: 89
user: How many multiples of $2005$ are factors of $(2005)^2$?

Answer: 4
user: A quadruple $(a, b, c, d)$ of distinct integers is said to be $\text{balanced}$ if $a + c = b + d$. Let $\mathcal{S}$ be any set of quadruples $(a, b, c, d)$ where $1 \leq a < b < d < c \leq 20$ and where the cardinality of $\mathcal{S}$ is $4411$. Find the least number of balanced quadruples in $\mathcal{S}$.

Answer: 91
user: Let $S(n)$ be the sum of the squares of the positive integers less than and coprime to $n$. For example, $S(5) = 1^2 + 2^2 + 3^2 + 4^2$, but $S(4) = 1^2 + 3^2$. Let $p = 2^7 - 1 = 127$ and $q = 2^5 - 1 = 31$ be primes. The quantity $S(pq)$ can be written in the form \( \frac{p^2q^2}{6}\left(a - \frac{b}{c} \right) \) where $a$, $b$, and $c$ are positive integers, with $b$ and $c$ coprime and $b < c$. Find $a$.

Answer: 7561
user: In baseball, a player's batting average is calculated as the number of hits divided by the number of at bats, rounded to three decimal places. Danielle's batting average is $0.399$. What is the fewest number of at bats that Danielle could have?

Answer: 138
user: Given that for reals $a_1, a_2, \ldots, a_{2004}$, the equation

$$x^{2006} - 2006x^{2005} + a_{2004}x^{2004} + \cdots + a_2x^2 + a_1x + 1 = 0$$

has 2006 positive real solutions, find the maximum possible value of $a_1$.

Answer: -2006
user: Find all natural numbers with the property that, when the first digit is moved to the end, the resulting number is \( \frac{7}{2} \) times the original one.

Answer: 153846
user: Find the smallest prime number that does not divide \(9 + 9^2 + 9^3 + \cdots + 9^{2010}\).

Answer: 17
user: Determine the smallest prime number that does not divide any five-digit number whose digits are in strictly increasing order.

Answer: 11
user: Two rays emanate from the origin $O$ and form a $45^\circ$ angle in the first quadrant of the Cartesian coordinate plane. For some positive numbers $X$, $Y$, and $S$, the ray with the larger slope passes through point $A = (X, S)$, and the ray with the smaller slope passes through point $B = (S, Y)$. If $6X + 6Y + 5S = 600$, then determine the maximum possible area of $\triangle OAB$.

Answer: 1500
user: Find the maximum possible value of $8 \cdot 27^{\log_6 x} + 27 \cdot 8^{\log_6 x} - x^3$ as $x$ varies over the positive real numbers.

Answer: 216
user: Evaluate \( \int_0^{2008} \left(3x^2 - 8028x + 2007^2 + \frac{1}{2008}\right)\, dx \).

Answer: 2009
user: For $n \geq 1$, let $a_n$ be the number beginning with $n$ 9's followed by 744; for example, $a_4 = 9999744$. Define \[ f(n) = \max \{ m \in \mathbb{N} \mid 2^m \text{ divides } a_n \}, \] for $n \geq 1$. Find $f(1) + f(2) + f(3) + \cdots + f(10)$.

Answer: 75
user: The number $21982145917308330487013369$ is the thirteenth power of a positive integer. Find the positive integer.

Answer: 89
user: A crazy physicist has discovered a new particle called an omon. He has a machine that takes two omons of mass $a$ and $b$ and entangles them. This process destroys the omon with mass $a$, preserves the one with mass $b$, and creates a new omon whose mass is $\frac{1}{2}(a+b)$. The physicist can then repeat the process with the two resulting omons, choosing which omon to destroy at every step. The physicist initially has two omons whose masses are distinct positive integers less than $1000$. What is the maximum possible number of times he can use his machine without producing an omon whose mass is not an integer?

Answer: 9
user: Observing the temperatures recorded in Cesenatico during December and January, Stefano noticed an interesting coincidence: for each day in this period, the low temperature is equal to the sum of the low temperatures of the preceding day and the succeeding day.

Given that the low temperatures on December $3$ and January $31$ were $5^\circ \text{C}$ and $2^\circ \text{C}$ respectively, find the low temperature on December $25$.

Answer: -3
user: Let $(x_n)$ be a sequence of positive integers defined as follows: $x_1$ is a fixed six-digit number and for any $n \geq 1$, $x_{n+1}$ is a prime divisor of $x_n + 1$. Find $x_{19} + x_{20}$.

Answer: 5
user: $ABCD$ forms a rhombus. $E$ is the intersection of $AC$ and $BD$. $F$ lies on $AD$ such that $EF$ is perpendicular to $FD$. Given $EF = 2$ and $FD = 1$. Find the area of the rhombus $ABCD$.

Answer: 20
user: According to Moor's Law, the number of shoes in Moor's room doubles every year. In 2013, Moor's room starts out having exactly one pair of shoes. If shoes always come in unique, matching pairs, what is the earliest year when Moor has the ability to wear at least 500 mismatched pairs of shoes? Note that left and right shoes are distinct, and Moor must always wear one of each.

Answer: 2018
user: Let $\frac{a}{b}$ be the probability that a randomly chosen positive divisor of $12^{2007}$ is also a divisor of $12^{2000}$, where $a$ and $b$ are relatively prime positive integers. Find the remainder when $a + b$ is divided by $2007$.

Answer: 79
user: The positive integer $m$ is a multiple of $101$, and the positive integer $n$ is a multiple of $63$. Their sum is $2018$. Find $m - n$.

Answer: 2
user: Let $ABCD$ be a trapezoid with $AB \parallel CD$ and $AD = BD$. Let $M$ be the midpoint of $AB$, and let $P \neq C$ be the second intersection of the circumcircle of $\triangle BCD$ and the diagonal $AC$. Suppose that $BC = 27$, $CD = 25$, and $AP = 10$. If $MP = \frac{a}{b}$ for relatively prime positive integers $a$ and $b$, compute $100a + b$.

Answer: 2705
user: We glue together $990$ one-inch cubes into a $9 \times 10 \times 11$ inch rectangular solid. Then we paint the outside of the solid. How many of the original $990$ cubes have just one of their sides painted?

Answer: 382
user: Say a real number $r$ is \emph{repetitive} if there exist two distinct complex numbers $z_1, z_2$ with $|z_1| = |z_2| = 1$ and $\{z_1, z_2\} \neq \{-i, i\}$ such that:
\[
z_1(z_1^3 + z_1^2 + rz_1 + 1) = z_2(z_2^3 + z_2^2 + rz_2 + 1).
\]
There exist real numbers $a, b$ such that a real number $r$ is \emph{repetitive} if and only if $a < r \le b$. If the value of $|a| + |b|$ can be expressed in the form $\frac{p}{q}$ for relatively prime positive integers $p$ and $q$, find $100p + q$.

Answer: 2504
user: Suppose that a planet contains $(CCAMATHBONANZA_{71})^{100}$ people ($100$ in decimal), where in base $71$ the digits $A, B, C, \ldots, Z$ represent the decimal numbers $10, 11, 12, \ldots, 35$, respectively. Suppose that one person on this planet is snapping, and each time they snap, at least half of the current population disappears. Estimate the largest number of times that this person can snap without disappearing. An estimate of $E$ earns $2^{1-\frac{1}{200}\left|A-E\right|}$ points, where $A$ is the actual answer.

Answer: 8355
user: A positive integer with at least two digits written in base $10$ is called 'ascending' if its digits increase in value from left to right. For example, $123$ is 'ascending', but $132$ and $122$ are not. How many 'ascending' numbers are there?

Answer: 502
user: Find the number of integers $n$ for which $n^2 + 10n < 2008$.

Answer: 91
user: Compute the number of five-digit positive integers whose digits have exactly $30$ distinct permutations.

Answer: 9720
user: What is the greatest number of balls of radius $\frac{1}{2}$ that can be placed within a rectangular box of size $10 \times 10 \times 1$?

Answer: 106
user: There are eight rooms on the first floor of a hotel, with four rooms on each side of the corridor, symmetrically situated (that is, each room is exactly opposite to one other room). Four guests have to be accommodated in four of the eight rooms (that is, one in each) such that no two guests are in adjacent rooms or in opposite rooms. In how many ways can the guests be accommodated?

Answer: 48
user: Amanda has the list of even numbers $2, 4, 6, \dots, 100$ and Billy has the list of odd numbers $1, 3, 5, \dots, 99$. Carlos creates a list by adding the square of each number in Amanda's list to the square of the corresponding number in Billy's list. Daisy creates a list by taking twice the product of corresponding numbers in Amanda's list and Billy's list. What is the positive difference between the sum of the numbers in Carlos's list and the sum of the numbers in Daisy's list?

Answer: 50
user: Find the least positive integer $N$ such that $N$ is 50 times the number of positive integer divisors of $N$.

Answer: 1800
user: In triangle $ABC$ with centroid $G$ and circumcircle $\omega$, line $\overline{AG}$ intersects $BC$ at $D$ and $\omega$ at $P$. Given that $GD = DP = 3$, and $GC = 4$, find $AB^2$.

Answer: 168
user: One side of a triangle has length $75$. Of the other two sides, the length of one is double the length of the other. What is the maximum possible area for this triangle?

Answer: 1875
user: A semicircle has diameter $XY$. A square $PQRS$ with side length 12 is inscribed in the semicircle with $P$ and $S$ on the diameter. Square $STUV$ has $T$ on $RS$, $U$ on the semicircle, and $V$ on $XY$. What is the area of $STUV$?

Answer: 36
user: The polynomial $f(x) = x^{4} + ax^{3} + bx^{2} + cx + d$ has real coefficients, and $f(2i) = f(2 + i) = 0$. What is $a + b + c + d$?

$\textbf{(A)}\ 0 \ \textbf{(B)}\ 1 \ \textbf{(C)}\ 4 \ \textbf{(D)}\ 9 \ \textbf{(E)}\ 16$

Answer: 9
user: Six integers $a, b, c, d, e, f$ satisfy the following system of equations:
\[
\begin{cases}
ace + 3ebd - 3bcf + 3adf = 5 \\
bce + acf - ade + 3bdf = 2
\end{cases}
\]
Find all possible values of $abcde$.

Answer: 0
user: Find the number of partitions of the set $\{1,2,3,\cdots ,11,12\}$ into three nonempty subsets such that no subset has two elements which differ by $1$.

Answer: 1023
user: How many positive integer solutions are there to \( w + x + y + z = 20 \) where \( w + x \ge 5 \) and \( y + z \ge 5 \)?

Answer: 781
user: Determine all positive integers $n$ with at least 4 factors such that $n$ is the sum of the squares of its 4 smallest factors.

Answer: 130
user: Daniel chooses some distinct subsets of $\{1, \dots, 2019\}$ such that any two distinct subsets chosen are disjoint. Compute the maximum possible number of subsets he can choose.

Answer: 2020
user: The sequence \( \{c_{n}\} \) is determined by the following equation: 
\[ c_{n} = (n+1) \int_{0}^{1} x^{n} \cos \pi x\, dx \quad (n = 1, 2, \ldots). \] 
Let \( \lambda \) be the limit value \( \lim_{n \to \infty} c_{n}. \) 
Find \( \lim_{n \to \infty} \frac{c_{n+1} - \lambda}{c_{n} - \lambda}. \)

Answer: 1
user: Find the largest prime number $p$ such that when $2012!$ is written in base $p$, it has at least $p$ trailing zeroes.

Answer: 43
user: Triangle $\triangle ABC$ has circumcenter $O$ and orthocenter $H$. Let $D$ be the foot of the altitude from $A$ to $BC$, and suppose $AD = 12$. If $BD = \frac{1}{4} BC$ and $OH \parallel BC$, compute $AB^2$.

Answer: 160
user: Tanya wrote numbers in the form $n^7 - 1$ for $n = 2, 3, \ldots$ and noticed that for $n = 8$, she obtained a number divisible by $337$. For what minimal $n$ did she get a number divisible by $2022$?

Answer: 79
user: Let $V$ be the set of vertices of a regular 25-sided polygon with center at point $C$. How many triangles have vertices in $V$ and contain the point $C$ in the interior of the triangle?

Answer: 650
user: Meredith drives in a series of directions:

5 miles to the northeast.
15 miles to the southeast.
25 miles to the southwest.
35 miles to the northwest.
20 miles to the northeast.

Calculate how many miles Meredith is from her starting point after completing her journey.

Answer: 20
user: The Flyfishing Club is choosing officers. There are $23$ members in the club: $14$ boys and $9$ girls. In how many ways can they choose a President and a Vice President if one of them must be a boy and the other must be a girl (either office can be held by the boy or the girl)?

Answer: 252
user: In duck language, only the letters $q$, $a$, and $k$ are used. There is no word with two consonants in succession, as ducks cannot pronounce them. However, all other four-letter words are meaningful in duck language. How many such words are there? 

In duck language, the letter $a$ is a vowel, while $q$ and $k$ are consonants.

Answer: 21
user: You are trapped in a room with only one exit, a long hallway with a series of doors and land mines. To get out, you must open all the doors and disarm all the mines. In the room, there is a panel with $3$ buttons, which conveniently contains an instruction manual:

- The red button arms a mine.
- The yellow button disarms two mines and closes a door.
- The green button opens two doors.

Initially, $3$ doors are closed, and $3$ mines are armed. The manual warns that attempting to disarm two mines or open two doors when only one is armed/closed will reset the system to its initial state. What is the minimum number of buttons you must push to get out?

Answer: 9
user: Let $\triangle ABC$ be a triangle where $\angle ACB = 40^\circ$ and $\angle BAC = 60^\circ$. Let $D$ be a point inside the segment $BC$ such that $CD = \frac{AB}{2}$, and let $M$ be the midpoint of the segment $AC$. Find the measure of the angle $\angle CMD$ in degrees.

Answer: 40
user: A frog is standing in the center of a $3 \times 3$ grid of lilypads. Each minute, the frog chooses a square that shares exactly one side with its current square uniformly at random and jumps onto the lilypad on the chosen square. The frog stops jumping once it reaches a lilypad on a corner of the grid. What is the expected number of times the frog jumps?

Answer: 3
user: Let $a, b, c, d$ be real numbers satisfying the system of equations:
\[
\begin{align*}
(a+b)(c+d) &= 2, \\
(a+c)(b+d) &= 3, \\
(a+d)(b+c) &= 4.
\end{align*}
\]
Find the minimum value of $a^2+b^2+c^2+d^2$.

Answer: 7
user: Find the least six-digit palindrome that is a multiple of $45$. Note that a palindrome is a number that reads the same forward and backwards, such as $1441$ or $35253$.

Answer: 504405
user: Find the smallest positive integer such that when the last digit is moved to the front, the new number is $\frac{3}{2}$ times the original number.

Answer: 285714
user: For how many positive integers $x$ less than $4032$ is $x^2 - 20$ divisible by $16$ and $x^2 - 16$ divisible by $20$?

Answer: 403
user: One day, I went for a walk in the morning at $x$ minutes past 5 o'clock, where $x$ is a two-digit number. When I returned, it was $y$ minutes past 6 o'clock. I noticed the following:

I walked for exactly $x$ minutes.
$y$ was a two-digit number obtained by reversing the digits of $x$.

How many minutes did I walk?

Answer: 42
user: Let \( a_k = 0.\overbrace{0 \ldots 0}^{k - 1 \: 0's} 1 \overbrace{0 \ldots 0}^{k - 1 \: 0's} 1 \).

The value of \( \sum_{k = 1}^\infty a_k \) can be expressed as a rational number \( \frac{p}{q} \) in simplest form. Find \( p + q \).

Answer: 37
user: How many integers can be expressed in the form: $\pm 1 \pm 2 \pm 3 \pm 4 \pm \cdots \pm 2018$?

Answer: 2037172
user: In a $2 \times 8$ squared board, you want to color each square red or blue such that on each $2 \times 2$ sub-board there are at least $3$ squares painted blue. In how many ways can this coloring be done?

**Note:** A $2 \times 2$ board is a square made up of $4$ squares that have a common vertex.

Answer: 341
user: Define the sequence of positive integers $\{a_n\}$ as follows:
- Let $a_1=1$, $a_2=3$.
- For each $n>2$, let $a_n$ be the result of expressing $a_{n-1}$ in base $n-1$, then reading the resulting numeral in base $n$, then adding $2$ (in base $n$).

For example:
- $a_2=3_{10}=11_2$, so $a_3=11_3+2_3=6_{10}$.

Express $a_{2013}$ in base $10$.

Answer: 23097
user: A rectangle $ABCD$ has side lengths $AB=6 \, \text{miles}$ and $BC=9\, \text{miles}$. A pigeon hovers at point $P$, which is 5 miles above some randomly chosen point inside $ABCD$. Given that the expected value of $AP^2 + CP^2 - BP^2 - DP^2$ can be expressed as $\frac{a}{b}$, what is $ab$?

Answer: 0
user: If $a_1, a_2, \ldots$ is a sequence of real numbers such that for all $n$, $$\sum_{k = 1}^n a_k \left( \frac{k}{n} \right)^2 = 1,$$ find the smallest $n$ such that $a_n < \frac{1}{2018}$.

Answer: 4036
user: Two concentric circles $\omega$ and $\Omega$ have radii 8 and 13, respectively. $AB$ is a diameter of $\Omega$, and the tangent from $B$ to $\omega$ touches $\omega$ at $D$. What is the length of $AD$?

Answer: 19
user: The country Dreamland consists of $2016$ cities. The airline Starways wants to establish some one-way flights between pairs of cities in such a way that each city has exactly one flight out of it. Find the smallest positive integer $k$ such that no matter how Starways establishes its flights, the cities can always be partitioned into $k$ groups so that from any city it is not possible to reach another city in the same group by using at most $28$ flights.

Answer: 57
user: Nine people sit in three rows of three chairs each. The probability that two of them, Celery and Drum, sit next to each other in the same row is $\frac{m}{n}$ for relatively prime positive integers $m$ and $n$. Find $100m+n$.

Answer: 106
user: An equilateral triangle with side length $6$ has a square of side length $6$ attached to each of its edges as shown. The distance between the two farthest vertices of this figure (marked $A$ and $B$ in the figure) can be written as $m + \sqrt{n}$ where $m$ and $n$ are positive integers. Find $m + n$.

Answer: 114
user: Given a $2018 \times 4$ grid, tint the cells with red and blue such that each row and each column has an equal number of red and blue cells. Determine the number of ways, $M$, to tint the grid with the mentioned requirement and find $M \pmod{2018}$.

Answer: 6
user: How many different (non-similar) triangles are there whose angles have an integer number of degrees?

Answer: 2700
user: How many ways are there to remove an $11 \times 11$ square from a $2011 \times 2011$ square so that the remaining part can be tiled with dominoes ($1 \times 2$ rectangles)?

Answer: 2002001
user: The diagram below shows twelve $30-60-90$ triangles placed in a circle such that the hypotenuse of each triangle coincides with the longer leg of the next triangle. The fourth and last triangle in this diagram are shaded. The ratio of the perimeters of these two triangles can be written as $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m + n$.

Answer: 337
user: Find the smallest two-digit positive integer that divides $201020112012$.

Answer: 12
user: If $x, y, z, p, q, r$ are real numbers such that:
\[ \frac{1}{x+p} + \frac{1}{y+p} + \frac{1}{z+p} = \frac{1}{p} \]
\[ \frac{1}{x+q} + \frac{1}{y+q} + \frac{1}{z+q} = \frac{1}{q} \]
\[ \frac{1}{x+r} + \frac{1}{y+r} + \frac{1}{z+r} = \frac{1}{r} \]
Find the numerical value of $\frac{1}{p} + \frac{1}{q} + \frac{1}{r}$.

Answer: 0
user: In one of the hotels on the wellness planet Oxys, there are $2019$ saunas. The managers have decided to accommodate $k$ couples for the upcoming long weekend. The following information is known about the guests:

If two women know each other, then their husbands also know each other, and vice versa.
Each sauna can be used by either men only or women only (there is no limit on the number of people using a sauna at once, as long as they are of a single gender).
Each woman is only willing to share a sauna with women whom she knows.
Each man is only willing to share a sauna with men whom he does not know.

What is the greatest possible $k$ for which we can guarantee, without knowing the exact relationships between the couples, that all the guests can use the saunas simultaneously while respecting the restrictions above?

Answer: 2018
user: For a natural number $n$, define the function $f(n)$ as the sum of the digits of the number $n$. For example, $f(16) = 7$, $f(f(78)) = 6$, and $f(f(f(5978))) = 2$.

Find the smallest natural number $n$ such that $f(f(f(n)))$ is not a one-digit number.

Answer: 20000000000000000000000
user: Let $x_1$ and $x_2$ be the roots of the equation $x^2 + 3x + 1 = 0$. Compute 
\[
\left(\frac{x_1}{x_2 + 1}\right)^2 + \left(\frac{x_2}{x_1 + 1}\right)^2
\]

Answer: 18
user: Find all integers $n$ such that the following number is a perfect square:
\[ N = n^4 + 6n^3 + 11n^2 + 3n + 31. \]

Answer: 10