1997 AIME Solutions

Scroll down to view professionally curated solutions from LIVE by Po-Shen Loh, print PDF solutions, view answer key, or take the full timed exam.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

1.

How many of the integers between 11 and 1000,1000, inclusive, can be expressed as the difference of the squares of two nonnegative integers?

Concepts:difference of squaresparity
Difficulty rating: 1890
Small Hint:

Factor a2b2=(ab)(a+b)a^2 - b^2 = (a - b)(a + b) and note the two factors always have the same parity

Big Hint:

Odd numbers and multiples of 44 are all achievable; numbers that are 22 more than a multiple of 44 are not

Solution:

Write n=a2b2=(ab)(a+b).n = a^2 - b^2 = (a - b)(a + b). The factors aba - b and a+ba + b differ by the even number 2b,2b, so they have the same parity. If both are odd, nn is odd; if both are even, nn is divisible by 4.4. Hence no integer n2(mod4)n \equiv 2 \pmod 4 is a difference of two squares.

Conversely, every odd number 2k+12k + 1 equals (k+1)2k2,(k+1)^2 - k^2, and every multiple of 4,4, say 4k,4k, equals (k+1)2(k1)2(k+1)^2 - (k-1)^2 (with k10k - 1 \ge 0 since k1k \ge 1).

Between 11 and 10001000 there are 500500 odd numbers and 250250 multiples of 4,4, for a total of 500+250=750.500 + 250 = 750.

2.

The nine horizontal and nine vertical lines on an 8×88 \times 8 checkerboard form rr rectangles, of which ss are squares. The number sr\frac{s}{r} can be written in the form mn,\frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Difficulty rating: 1890
Small Hint:

A rectangle is determined by choosing 22 of the 99 horizontal lines and 22 of the 99 vertical lines

Big Hint:

There are (9k)2(9 - k)^2 squares of size k×k;k \times k; sum over k=1k = 1 to 88

Solution:

A rectangle is determined by choosing two of the nine horizontal lines and two of the nine vertical lines, so r=(92)2=362=1296.r = \binom{9}{2}^2 = 36^2 = 1296.

A k×kk \times k square can be placed in (9k)2(9 - k)^2 positions, so s=k=18(9k)2=82+72++12=89176=204. \begin{aligned} s &= \sum_{k=1}^{8} (9 - k)^2 \\ &= 8^2 + 7^2 + \cdots + 1^2 \\ &= \frac{8 \cdot 9 \cdot 17}{6} = 204. \end{aligned}

Then sr=2041296=17108,\frac{s}{r} = \frac{204}{1296} = \frac{17}{108}, which is in lowest terms, so m+n=17+108=125.m + n = 17 + 108 = 125.

3.

Sarah intended to multiply a two-digit number and a three-digit number, but she left out the multiplication sign and simply placed the two-digit number to the left of the three-digit number, thereby forming a five-digit number. This number is exactly nine times the product Sarah should have obtained. What is the sum of the two-digit number and the three-digit number?

Difficulty rating: 2110
Small Hint:

If the two-digit number is aa and the three-digit number is b,b, the five-digit number is 1000a+b1000a + b

Big Hint:

Rewrite 1000a+b=9ab1000a + b = 9ab as b(9a1)=1000a;b(9a - 1) = 1000a; since gcd(9a1,a)=1,\gcd(9a - 1, a) = 1, the factor 9a19a - 1 must divide 10001000

Solution:

Let aa be the two-digit number and bb the three-digit number. The condition is 1000a+b=9ab,1000a + b = 9ab, which rearranges to b(9a1)=1000a.b(9a - 1) = 1000a. Since gcd(9a1,a)=1,\gcd(9a - 1, a) = 1, the number 9a19a - 1 must divide 1000.1000.

For a two-digit a,a, 9a19a - 1 runs from 8989 to 890,890, and 9a18(mod9).9a - 1 \equiv 8 \pmod 9. The only divisor of 10001000 in that range congruent to 88 modulo 99 is 125,125, giving a=14a = 14 and b=100014125=112,b = \frac{1000 \cdot 14}{125} = 112, which is indeed a three-digit number. Check: 14112=914112.14112 = 9 \cdot 14 \cdot 112.

The requested sum is 14+112=126.14 + 112 = 126.

4.

Circles of radii 5,5, 5,5, 8,8, and mn\frac{m}{n} are mutually externally tangent, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Difficulty rating: 2390
Small Hint:

The two radius-55 centers are 1010 apart, and the other two centers both lie on the perpendicular bisector of that segment

Big Hint:

Right triangles give midpoint distances 1212 and r2+10r;\sqrt{r^2 + 10r}; rule out opposite sides before subtracting them

Solution:

Let the radius-55 circles have centers P1P_1 and P2,P_2, so P1P2=5+5=10,P_1P_2 = 5 + 5 = 10, and let MM be the midpoint. The radius-88 circle’s center QQ satisfies QP1=QP2=13,QP_1 = QP_2 = 13, so QQ lies on the perpendicular bisector of P1P2\overline{P_1P_2} at distance 13252=12\sqrt{13^2 - 5^2} = 12 from M.M. Likewise the fourth circle, of radius r,r, has its center RR on the same perpendicular bisector with RP1=5+r,RP_1 = 5 + r, so RM=(5+r)225RM = \sqrt{(5+r)^2 - 25} =r2+10r.= \sqrt{r^2 + 10r}.

The centers QQ and RR cannot lie on opposite sides of M:M: that would give 12+RM=8+r,12 + RM = 8 + r, hence RM=r4,RM = r - 4, but squaring would yield 18r=16,18r = 16, contrary to r4.r \ge 4. Nor can RR lie beyond Q,Q, since then RM12=8+rRM - 12 = 8 + r would force RM=r+20,RM = r + 20, which is incompatible with RM2=r2+10r.RM^2 = r^2 + 10r. Thus RR lies between MM and Q,Q, and external tangency to the radius-88 circle gives 12r2+10r=8+r.12 - \sqrt{r^2 + 10r} = 8 + r. Then r2+10r=4r,\sqrt{r^2 + 10r} = 4 - r, and squaring yields r2+10r=168r+r2,r^2 + 10r = 16 - 8r + r^2, so 18r=1618r = 16 and r=89.r = \frac{8}{9}.

Thus m+n=8+9=17.m + n = 8 + 9 = 17.

5.

The number rr can be expressed as a four-place decimal 0.abcd,0.abcd, where a,a, b,b, c,c, and dd represent digits, any of which could be zero. It is desired to approximate rr by a fraction whose numerator is 11 or 22 and whose denominator is an integer. The closest such fraction to rr is 27.\frac{2}{7}. What is the number of possible values for r?r?

Difficulty rating: 2450
Small Hint:

Find the fractions with numerator 11 or 22 closest to 27\frac{2}{7} on each side

Big Hint:

rr must be closer to 27\frac{2}{7} than to 14\frac{1}{4} or 13;\frac{1}{3}; count four-place decimals between 1556\frac{15}{56} and 1342\frac{13}{42}

Solution:

Among fractions with numerator 11 or 2,2, the closest neighbors of 270.2857\frac{2}{7} \approx 0.2857 are 14=0.25\frac{1}{4} = 0.25 below (note 28=14\frac{2}{8} = \frac{1}{4}) and 130.3333\frac{1}{3} \approx 0.3333 above (note 26=13\frac{2}{6} = \frac{1}{3}); no other candidate lies between them. So 27\frac{2}{7} is the unique closest fraction to rr exactly when rr is closer to 27\frac{2}{7} than to both 14\frac{1}{4} and 13,\frac{1}{3}, i.e. when rr lies strictly between the midpoints 12(14+27)=1556=0.26785 \begin{aligned} \frac{1}{2}\left(\frac{1}{4} + \frac{2}{7}\right) &= \frac{15}{56} \\ &= 0.26785\ldots \end{aligned} and 12(27+13)=1342=0.30952. \begin{aligned} \frac{1}{2}\left(\frac{2}{7} + \frac{1}{3}\right) &= \frac{13}{42} \\ &= 0.30952\ldots. \end{aligned}

The four-place decimals in that interval are 0.2679,0.2680,,0.3095,0.2679, 0.2680, \ldots, 0.3095, and there are 30952679+1=4173095 - 2679 + 1 = 417 of them.

6.

Point BB is in the exterior of the regular nn-sided polygon A1A2An,A_1A_2\cdots A_n, and A1A2BA_1A_2B is an equilateral triangle. What is the largest value of nn for which An,A_n, A1,A_1, and BB are consecutive vertices of a regular polygon?

Difficulty rating: 2300
Small Hint:

The nn-gon’s interior angle, the 6060^\circ angle, and BA1An\angle BA_1A_n together fill 360360^\circ at A1A_1

Big Hint:

Setting BA1An\angle BA_1A_n equal to the interior angle of a regular mm-gon gives 1m=161n,\frac{1}{m} = \frac{1}{6} - \frac{1}{n}, so n6n - 6 must divide 3636

Solution:

Since BB is outside the nn-gon, the angles at A1A_1 — the interior angle AnA1A2=(n2)180n,\angle A_nA_1A_2 = \frac{(n-2)180^\circ}{n}, the equilateral angle A2A1B=60,\angle A_2A_1B = 60^\circ, and BA1An\angle BA_1A_n — fill a full revolution, so BA1An=300(n2)180n=120+360n. \begin{aligned} \angle BA_1A_n &= 300^\circ - \frac{(n-2)180^\circ}{n} \\ &= 120^\circ + \frac{360^\circ}{n}. \end{aligned} Also AnA1=A1B,A_nA_1 = A_1B, since both equal the side of the nn-gon.

For An,A_n, A1,A_1, BB to be consecutive vertices of a regular mm-gon, this angle must be the mm-gon’s interior angle: 120+360n=180360m,120^\circ + \frac{360^\circ}{n} = 180^\circ - \frac{360^\circ}{m}, which simplifies to 1m=161n,\frac{1}{m} = \frac{1}{6} - \frac{1}{n}, so m=6nn6=6+36n6.m = \frac{6n}{n - 6} = 6 + \frac{36}{n - 6}.

Thus n6n - 6 must divide 36,36, and the largest choice is n6=36,n - 6 = 36, i.e. n=42n = 42 (with m=7m = 7).

7.

A car travels due east at 23\frac{2}{3} mile per minute on a long, straight road. At the same time, a circular storm, whose radius is 5151 miles, moves southeast at 122\frac{1}{2}\sqrt{2} mile per minute. At time t=0,t = 0, the center of the storm is 110110 miles due north of the car. At time t=t1t = t_1 minutes, the car enters the storm circle, and at time t=t2t = t_2 minutes, the car leaves the storm circle. Find 12(t1+t2).\frac{1}{2}(t_1 + t_2).

Difficulty rating: 2400
Small Hint:

Set up coordinates: the car is at (2t3,0)\left(\frac{2t}{3}, 0\right) and the storm center at (t2,110t2)\left(\frac{t}{2}, 110 - \frac{t}{2}\right)

Big Hint:

Entering and leaving happen when the squared distance equals 512;51^2; that is a quadratic in t,t, so use Vieta’s formulas for t1+t2t_1 + t_2

Solution:

Put the car at the origin at t=0,t = 0, with east as the positive xx-direction and north as the positive yy-direction. At time tt the car is at (2t3,0),\left(\frac{2t}{3}, 0\right), and the storm center, moving southeast at speed 22\frac{\sqrt{2}}{2} (components 12\frac{1}{2} east and 12\frac{1}{2} south), is at (t2,110t2).\left(\frac{t}{2}, 110 - \frac{t}{2}\right).

The car is on the storm boundary when the squared distance is 512:51^2: (2t3t2)2+(110t2)2=512, \begin{aligned} &\left(\frac{2t}{3} - \frac{t}{2}\right)^2 \\ &\quad {}+ \left(110 - \frac{t}{2}\right)^2 = 51^2, \end{aligned} that is t236+t24\frac{t^2}{36} + \frac{t^2}{4} 110t+121002601=0,- 110t + 12100 - 2601 = 0, or 518t2110t+9499=0.\frac{5}{18}t^2 - 110t + 9499 = 0.

The roots are t1t_1 and t2,t_2, so by Vieta’s formulas t1+t2=110185=396,t_1 + t_2 = \frac{110 \cdot 18}{5} = 396, and 12(t1+t2)=198.\frac{1}{2}(t_1 + t_2) = 198.

8.

How many different 4×44 \times 4 arrays whose entries are all 11’s and 1-1’s have the property that the sum of the entries in each row is 00 and the sum of the entries in each column is 0?0?

Difficulty rating: 2560
Small Hint:

Record each row by the pair of columns holding its 11’s, and split into cases by how row 22 overlaps row 11

Big Hint:

When rows 11 and 22 share 2,2, 1,1, or 00 columns, count how many ways rows 33 and 44 can finish the columns

Solution:

Each row must contain two 11’s and two 1-1’s, so identify each row with the pair of columns holding its 11’s; each column must end up chosen by exactly two rows. There are (42)=6\binom{4}{2} = 6 choices for row 1.1. Classify by how row 22 overlaps row 1.1.

If row 22 uses the same pair (11 way), those two columns are full, so rows 33 and 44 must both use the complementary pair: 11 completion. If row 22 uses the complementary pair (11 way), every column has one 11 so far, so rows 33 and 44 need only be a complementary pair themselves: 66 choices for row 3,3, row 44 forced, giving 66 completions. If row 22 shares exactly one column with row 11 (22=42 \cdot 2 = 4 ways), one column is full, two have one 1,1, and one is empty; rows 33 and 44 must each take the empty column together with one of the two half-filled columns, so there are 22 completions.

The total is 6(11+16+42)=6156\,(1 \cdot 1 + 1 \cdot 6 + 4 \cdot 2) = 6 \cdot 15 =90.= 90.

9.

Given a nonnegative real number x,x, let x\langle x\rangle denote the fractional part of x;x; that is, x=xx,\langle x\rangle = x - \lfloor x\rfloor, where x\lfloor x\rfloor denotes the greatest integer less than or equal to x.x. Suppose that aa is positive, a1=a2,\langle a^{-1}\rangle = \langle a^2\rangle, and 2<a2<3.2 \lt a^2 \lt 3. Find the value of a12144a1.a^{12} - 144a^{-1}.

Difficulty rating: 2560
Small Hint:

Since 2<a2<32 \lt a^2 \lt 3 and 0<a1<1,0 \lt a^{-1} \lt 1, the condition says a1=a22a^{-1} = a^2 - 2

Big Hint:

The cubic a32a1=0a^3 - 2a - 1 = 0 factors with root a=1+52;a = \frac{1 + \sqrt{5}}{2}; use a2=a+1a^2 = a + 1 repeatedly to reduce a12a^{12}

Solution:

From 2<a2<32 \lt a^2 \lt 3 we get 2<a<3,\sqrt{2} \lt a \lt \sqrt{3}, so 0<a1<10 \lt a^{-1} \lt 1 and a1=a1,\langle a^{-1}\rangle = a^{-1}, while a2=a22.\langle a^2\rangle = a^2 - 2. The condition becomes a1=a22,a^{-1} = a^2 - 2, i.e. a32a1=0,a^3 - 2a - 1 = 0, which factors as (a+1)(a2a1)=0.(a + 1)(a^2 - a - 1) = 0. Since a>0,a \gt 0, we get a=1+52,a = \frac{1 + \sqrt{5}}{2}, the golden ratio, and indeed a2=a+12.618a^2 = a + 1 \approx 2.618 lies in (2,3).(2, 3).

Using a2=a+1a^2 = a + 1 repeatedly: a4=(a+1)2=3a+2,a^4 = (a+1)^2 = 3a + 2, a8=(3a+2)2a^8 = (3a+2)^2 =9(a+1)+12a+4= 9(a+1) + 12a + 4 =21a+13,= 21a + 13, and a12=a8a4a^{12} = a^8 a^4 =(21a+13)(3a+2)= (21a + 13)(3a + 2) =63(a+1)+81a+26= 63(a+1) + 81a + 26 =144a+89.= 144a + 89. Also a1=a1a^{-1} = a - 1 from a2=a+1.a^2 = a + 1.

Therefore a12144a1a^{12} - 144a^{-1} =144a+89144(a1)= 144a + 89 - 144(a - 1) =89+144=233.= 89 + 144 = 233.

10.

Every card in a deck has a picture of one shape — circle, square, or triangle, which is painted in one of the three colors — red, blue, or green. Furthermore, each color is applied in one of three shades — light, medium, or dark. The deck has 2727 cards, with every shape-color-shade combination represented. A set of three cards from the deck is called complementary if all of the following statements are true:

• Either each of the three cards has a different shape or all three of the cards have the same shape.

• Either each of the three cards has a different color or all three of the cards have the same color.

• Either each of the three cards has a different shade or all three of the cards have the same shade.

How many different complementary three-card sets are there?

Difficulty rating: 2450
Small Hint:

Check that any two distinct cards are completed to a complementary set by exactly one third card

Big Hint:

Count pairs of cards, then figure out how many different pairs give rise to the same three-card set

Solution:

Given any two distinct cards, there is exactly one card completing them to a complementary set: in each attribute, if the two cards agree, the third card must share that value, and if they differ, the third must take the one remaining value. The completing card is distinct from both (the two given cards differ somewhere, and in that attribute the third card differs from each).

So the (272)=351\binom{27}{2} = 351 pairs of cards each extend to one complementary set, and each complementary set is produced by (32)=3\binom{3}{2} = 3 of these pairs. The number of sets is 3513=117.\frac{351}{3} = 117.

11.

Let x=n=144cosnn=144sinn.x = \frac{\displaystyle\sum_{n=1}^{44} \cos n^\circ}{\displaystyle\sum_{n=1}^{44} \sin n^\circ}. What is the greatest integer that does not exceed 100x?100x?

Difficulty rating: 2710
Small Hint:

Multiply numerator and denominator by 2sin122\sin\frac{1}{2}^\circ and telescope using product-to-sum identities

Big Hint:

Sum-to-product turns the result into cot22.5,\cot 22.5^\circ, which the half-angle formula evaluates exactly

Solution:

Multiply numerator and denominator by 2sin12.2\sin\frac{1}{2}^\circ. Since 2cosnsin122\cos n^\circ \sin\frac{1}{2}^\circ =sin(n+12)= \sin\left(n + \frac{1}{2}\right)^\circ sin(n12)- \sin\left(n - \frac{1}{2}\right)^\circ and 2sinnsin122\sin n^\circ \sin\frac{1}{2}^\circ =cos(n12)= \cos\left(n - \frac{1}{2}\right)^\circ cos(n+12),- \cos\left(n + \frac{1}{2}\right)^\circ, both sums telescope: x=sin44.5sin0.5cos0.5cos44.5=2cos22.5sin222sin22.5sin22=cot22.5, \begin{aligned} x &= \frac{\sin 44.5^\circ - \sin 0.5^\circ}{\cos 0.5^\circ - \cos 44.5^\circ} \\ &= \frac{2\cos 22.5^\circ \sin 22^\circ}{2\sin 22.5^\circ \sin 22^\circ} \\ &= \cot 22.5^\circ, \end{aligned} using the sum-to-product identities in the last step.

By the half-angle formula, cot22.5=1+cos45sin45=2+1.\cot 22.5^\circ = \frac{1 + \cos 45^\circ}{\sin 45^\circ} = \sqrt{2} + 1. Since 1.412<2<1.422,1.41^2 \lt 2 \lt 1.42^2, we have 241<1002+100<242.241 \lt 100\sqrt{2} + 100 \lt 242. Therefore the greatest integer not exceeding 100x100x is 241.241.

12.

The function ff defined by f(x)=ax+bcx+d,f(x) = \frac{ax + b}{cx + d}, where a,a, b,b, c,c, and dd are nonzero real numbers, has the properties f(19)=19,f(19) = 19, f(97)=97,f(97) = 97, and f(f(x))=xf(f(x)) = x for all values except dc.\frac{-d}{c}. Find the unique number that is not in the range of f.f.

Difficulty rating: 2560
Small Hint:

f(f(x))=xf(f(x)) = x means ff is its own inverse; comparing coefficients forces d=ad = -a

Big Hint:

1919 and 9797 are the roots of cx2+(da)xb=0,cx^2 + (d - a)x - b = 0, and the missing value is the horizontal asymptote ac\frac{a}{c}

Solution:

Composing, f(f(x))=(a2+bc)x+b(a+d)c(a+d)x+(bc+d2),f(f(x)) = \frac{(a^2 + bc)x + b(a + d)}{c(a + d)x + (bc + d^2)}, and this equals xx identically only if c(a+d)=0.c(a + d) = 0. Since c0,c \ne 0, we get d=a,d = -a, so f(x)=ax+bcxa.f(x) = \frac{ax + b}{cx - a}.

A fixed point satisfies cx2ax=ax+b,cx^2 - ax = ax + b, i.e. cx22axb=0,cx^2 - 2ax - b = 0, whose roots are 1919 and 97.97. By Vieta’s formulas, 19+97=2ac,19 + 97 = \frac{2a}{c}, so ac=58.\frac{a}{c} = 58.

Finally, yy is in the range exactly when y=ax+bcxay = \frac{ax + b}{cx - a} has a solution, i.e. x(cya)=ay+b.x(cy - a) = ay + b. This solves for xx unless cya=0;cy - a = 0; and when y=ac,y = \frac{a}{c}, the right side a2c+b=a2+bcc\frac{a^2}{c} + b = \frac{a^2 + bc}{c} is nonzero (otherwise the fractional-linear expression would be degenerate, contrary to its two distinct fixed points). So the unique number not in the range is ac=58.\frac{a}{c} = 58.

13.

Let SS be the set of points in the Cartesian plane that satisfy x21+y21=1. \begin{aligned} &\Bigl|\bigl||x| - 2\bigr| - 1\Bigr| \\ &\quad {}+ \Bigl|\bigl||y| - 2\bigr| - 1\Bigr| = 1. \end{aligned} If a model of SS were built from wire of negligible thickness, then the total length of wire required would be ab,a\sqrt{b}, where aa and bb are positive integers and bb is not divisible by the square of any prime number. Find a+b.a + b.

Difficulty rating: 2920
Small Hint:

For 0x20 \le x \le 2 the expression x21\bigl||x| - 2\bigr| - 1 equals 1x,1 - x, and for 2x42 \le x \le 4 it equals x3x - 3

Big Hint:

The graph is a union of diamonds xa+yb=1;|x - a| + |y - b| = 1; count the possible centers and multiply by one diamond’s perimeter

Solution:

Let f(t)=t21,f(t) = \bigl|\,||t| - 2| - 1\,\bigr|, so the equation is f(x)+f(y)=1.f(x) + f(y) = 1. The function ff is even, and for t0:t \ge 0: on [0,2],[0, 2], t21=(2t)1||t| - 2| - 1 = (2 - t) - 1 =1t,= 1 - t, so f(t)=t1;f(t) = |t - 1|; on [2,4],[2, 4], f(t)=t3;f(t) = |t - 3|; and for t>4,t \gt 4, f(t)=t3>1,f(t) = t - 3 \gt 1, which is too large. So on the relevant range, f(t)=taf(t) = |t - a| where a{3,1,1,3}a \in \{-3, -1, 1, 3\} is the nearest of those four values to t.t.

Therefore SS is the union of the 1616 taxicab circles xa+yb=1,a,b{3,1,1,3}, \begin{aligned} &|x - a| + |y - b| = 1, \\ &\qquad a, b \in \{-3, -1, 1, 3\}, \end{aligned} which meet only at isolated points. Each is a square (diamond) with diagonal 2,2, hence side 2\sqrt{2} and perimeter 42.4\sqrt{2}.

The total length is 1642=642,16 \cdot 4\sqrt{2} = 64\sqrt{2}, so a+b=64+2=66.a + b = 64 + 2 = 66.

14.

Let vv and ww be distinct, randomly chosen roots of the equation z19971=0.z^{1997} - 1 = 0. Let mn\frac{m}{n} be the probability that 2+3v+w,\sqrt{2 + \sqrt{3}} \le |v + w|, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Difficulty rating: 2920
Small Hint:

Fix v;v; if w=ve2πik1997,w = v e^{\frac{2\pi i k}{1997}}, then v+w=2cosπk1997|v + w| = 2\left|\cos\frac{\pi k}{1997}\right|

Big Hint:

Since 2+3=2cos15,\sqrt{2 + \sqrt{3}} = 2\cos 15^\circ, count kk with k1997112\frac{k}{1997} \le \frac{1}{12} or k19971112\frac{k}{1997} \ge \frac{11}{12}

Solution:

By rotational symmetry we may fix vv and let w=ve2πik1997w = v e^{\frac{2\pi i k}{1997}} with kk uniform in {1,2,,1996}.\{1, 2, \ldots, 1996\}. Then v+w=1+e2πik1997=2cosπk1997. \begin{aligned} |v + w| &= \left|1 + e^{\frac{2\pi i k}{1997}}\right| \\ &= 2\left|\cos\frac{\pi k}{1997}\right|. \end{aligned} Also (2cos15)2=2+2cos30\left(2\cos 15^\circ\right)^2 = 2 + 2\cos 30^\circ =2+3,= 2 + \sqrt{3}, so the threshold is 2+3=2cosπ12.\sqrt{2 + \sqrt{3}} = 2\cos\frac{\pi}{12}.

The condition cosπk1997cosπ12\left|\cos\frac{\pi k}{1997}\right| \ge \cos\frac{\pi}{12} holds exactly when πk1997\frac{\pi k}{1997} is within π12\frac{\pi}{12} of 00 or of π,\pi, i.e. k199712=166.41k \le \frac{1997}{12} = 166.41\ldots or k11199712=1830.58.k \ge \frac{11 \cdot 1997}{12} = 1830.58\ldots. That gives 166+166=332166 + 166 = 332 favorable values of k.k.

The probability is 3321996=83499,\frac{332}{1996} = \frac{83}{499}, and 499499 is prime, so m+n=83+499=582.m + n = 83 + 499 = 582.

15.

The sides of rectangle ABCDABCD have lengths 1010 and 11.11. An equilateral triangle is drawn so that no point of the triangle lies outside ABCD.ABCD. The maximum possible area of such a triangle can be written in the form pqr,p\sqrt{q} - r, where p,p, q,q, and rr are positive integers, and qq is not divisible by the square of any prime number. Find p+q+r.p + q + r.

Difficulty rating: 3160
Small Hint:

The largest triangle is tilted, with one vertex at a corner of the rectangle and the other two on the far sides

Big Hint:

With side ss tilted θ\theta above the length-1111 side, scosθ=11s\cos\theta = 11 and ssin(θ+60)=10;s\sin(\theta + 60^\circ) = 10; solve for tanθ\tan\theta

Solution:

By reflecting or rotating the configuration, take one side of the equilateral triangle to make an angle 0θ300\le\theta\le30^\circ with the length-1111 side of the rectangle. A triangle of side ss in this orientation has horizontal and vertical spans scosθs\cos\theta and ssin(θ+60),s\sin(\theta+60^\circ), respectively. Hence smin(11cosθ,10sin(θ+60)). s\le\min\left(\frac{11}{\cos\theta}, \frac{10}{\sin(\theta+60^\circ)}\right). The first bound increases with θ\theta and the second decreases, so their minimum is largest when they are equal. This bound is attainable by putting one vertex at a corner and the other two on the far sides, giving scosθ=11,ssin(θ+60)=10. \begin{aligned} s\cos\theta &= 11, \\ s\sin(\theta + 60^\circ) &= 10. \end{aligned}

Dividing, 11sin(θ+60)=10cosθ,11\sin(\theta + 60^\circ) = 10\cos\theta, and expanding the left side gives 112sinθ+1132cosθ=10cosθ,\frac{11}{2}\sin\theta + \frac{11\sqrt{3}}{2}\cos\theta = 10\cos\theta, so tanθ=2011311\tan\theta = \frac{20 - 11\sqrt{3}}{11} (about 4.9,4.9^\circ, a legal tilt). Then s2=121cos2θ=121(1+tan2θ)=121+(20113)2=8844403. \begin{aligned} s^2 &= \frac{121}{\cos^2\theta} \\ &= 121\left(1 + \tan^2\theta\right) \\ &= 121 + \left(20 - 11\sqrt{3}\right)^2 \\ &= 884 - 440\sqrt{3}. \end{aligned}

The area is 34s2=34(8844403)\frac{\sqrt{3}}{4}s^2 = \frac{\sqrt{3}}{4}\left(884 - 440\sqrt{3}\right) =221333052.8,= 221\sqrt{3} - 330 \approx 52.8, which indeed beats the untilted triangle of side 10.10. Thus p+q+rp + q + r =221+3+330=554.= 221 + 3 + 330 = 554.