2017 AIME II Problems

Scroll down and press Start to try the exam! Or, go to the printable PDF, answer key, or professional solutions curated by LIVE by Po-Shen Loh.

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

Or jump straight to a single problem with its solution: 1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15

Want to learn professionally through interactive video classes?

Learn LIVE

Timed

3:00:00

1.

Find the number of subsets of {1,2,3,4,5,6,7,8}\{1, 2, 3, 4, 5, 6, 7, 8\} that are subsets of neither {1,2,3,4,5}\{1, 2, 3, 4, 5\} nor {4,5,6,7,8}.\{4, 5, 6, 7, 8\}.

Answer: 196
Concepts:subsetsinclusion-exclusion
Difficulty rating: 1890
Small Hint:

Count the complement: subsets that lie entirely inside {1,2,3,4,5}\{1,2,3,4,5\} or entirely inside {4,5,6,7,8}\{4,5,6,7,8\}

Big Hint:

By inclusion-exclusion, the overlap consists of the subsets of {4,5},\{4, 5\}, so subtract 25+25222^5 + 2^5 - 2^2 from 282^8

Solution:

There are 28=2562^8 = 256 subsets in all. The ones to exclude are those contained in {1,2,3,4,5}\{1,2,3,4,5\} (there are 25=322^5 = 32) or contained in {4,5,6,7,8}\{4,5,6,7,8\} (another 3232). A subset of both is exactly a subset of the intersection {4,5},\{4, 5\}, and there are 22=42^2 = 4 of those.

By inclusion-exclusion, 32+324=6032 + 32 - 4 = 60 subsets fail, so 25660=196256 - 60 = 196 subsets have the required property.

2.

Teams T1,T_1, T2,T_2, T3,T_3, and T4T_4 are in the playoffs. In the semifinal matches, T1T_1 plays T4,T_4, and T2T_2 plays T3.T_3. The winners of those two matches will play each other in the final match to determine the champion. When TiT_i plays Tj,T_j, the probability that TiT_i wins is ii+j,\frac{i}{i+j}, and the outcomes of all the matches are independent. The probability that T4T_4 will be the champion is pq,\frac{p}{q}, where pp and qq are relatively prime positive integers. Find p+q.p + q.

Answer: 781
Difficulty rating: 2070
Small Hint:

T4T_4 must beat T1T_1 in its semifinal, then beat whichever of T2T_2 and T3T_3 wins the other semifinal

Big Hint:

Split into cases by the other semifinal: T2T_2 reaches the final with probability 25,\frac{2}{5}, and T4T_4 beats T2T_2 or T3T_3 with probability 46\frac{4}{6} or 47\frac{4}{7}

Solution:

To be champion, T4T_4 must first beat T1,T_1, which happens with probability 44+1=45.\frac{4}{4+1} = \frac{4}{5}. The other semifinal sends T2T_2 to the final with probability 22+3=25\frac{2}{2+3} = \frac{2}{5} and T3T_3 with probability 35;\frac{3}{5}; in the final, T4T_4 beats T2T_2 with probability 44+2=23\frac{4}{4+2} = \frac{2}{3} and beats T3T_3 with probability 44+3=47.\frac{4}{4+3} = \frac{4}{7}.

The probability that T4T_4 is champion is therefore 45(2523+3547)=4564105=256525. \begin{aligned} &\frac{4}{5}\left(\frac{2}{5} \cdot \frac{2}{3} + \frac{3}{5} \cdot \frac{4}{7}\right) \\ &= \frac{4}{5} \cdot \frac{64}{105} \\ &= \frac{256}{525}. \end{aligned} Since 256=28256 = 2^8 and 525=3527,525 = 3 \cdot 5^2 \cdot 7, this is in lowest terms, and p+q=256+525=781.p + q = 256 + 525 = 781.

3.

A triangle has vertices A(0,0),A(0, 0), B(12,0),B(12, 0), and C(8,10).C(8, 10). The probability that a randomly chosen point inside the triangle is closer to vertex BB than to either vertex AA or vertex CC can be written as pq,\frac{p}{q}, where pp and qq are relatively prime positive integers. Find p+q.p + q.

Answer: 409
Difficulty rating: 2230
Small Hint:

The points closer to BB than to AA lie on one side of the perpendicular bisector of AB;\overline{AB}; likewise for CC

Big Hint:

The bisectors are x=6x = 6 and y=25x+1;y = \frac{2}{5}x + 1; find the area of the quadrilateral they cut off near BB and divide by 6060

Solution:

The points closer to BB than to AA lie to the right of the perpendicular bisector of AB,\overline{AB}, the line x=6.x = 6. The points closer to BB than to CC lie below the perpendicular bisector of BC,\overline{BC}, which passes through the midpoint (10,5)(10, 5) with slope 25\frac{2}{5} (the negative reciprocal of the slope 52-\frac{5}{2} of BCBC): the line y=25x+1.y = \frac{2}{5}x + 1.

Inside the triangle, the favorable region is the quadrilateral with vertices (6,0),(6, 0), B(12,0),B(12, 0), the midpoint (10,5)(10, 5) of BC,\overline{BC}, and (6,175),\left(6, \frac{17}{5}\right), where the two bisectors meet. Splitting it along the segment from (6,0)(6, 0) to (10,5),(10, 5), its area is 121754+1265=345+15=1095. \begin{aligned} &\frac{1}{2} \cdot \frac{17}{5} \cdot 4 + \frac{1}{2} \cdot 6 \cdot 5 \\ &= \frac{34}{5} + 15 \\ &= \frac{109}{5}. \end{aligned}

The triangle has area 121210=60,\frac{1}{2} \cdot 12 \cdot 10 = 60, so the probability is 109560=109300,\frac{\frac{109}{5}}{60} = \frac{109}{300}, and p+q=109+300=409.p + q = 109 + 300 = 409.

4.

Find the number of positive integers less than or equal to 20172017 whose base-three representation contains no digit equal to 0.0.

Answer: 222
Difficulty rating: 2230
Small Hint:

A base-three representation avoids the digit 00 exactly when every digit is 11 or 2;2; there are 2k2^k such kk-digit numbers

Big Hint:

Since 2017=22022013,2017 = 2202201_3, decide which 77-digit strings of 11s and 22s stay below the bound by looking at the first two digits

Solution:

A positive integer has no 00 in base three exactly when every digit is 11 or 2.2. For k=1,2,,6k = 1, 2, \ldots, 6 there are 2k2^k such kk-digit numbers, and all of them are at most 2222223=728<2017.222222_3 = 728 \lt 2017.

Since 2017=22022013,2017 = 2202201_3, a seven-digit string of 11s and 22s is at most 20172017 exactly when it begins with 11,11, 12,12, or 21:21: any string beginning 2222 already beats 220220132202201_3 at the third digit, since its digits are nonzero. That gives 325=963 \cdot 2^5 = 96 seven-digit numbers.

The total is 2+4+8+16+32+642 + 4 + 8 + 16 + 32 + 64 +96=222.+ 96 = 222.

5.

A set contains four numbers. The six pairwise sums of distinct elements of the set, in no particular order, are 189,189, 320,320, 287,287, 234,234, x,x, and y.y. Find the greatest possible value of x+y.x + y.

Answer: 791
Difficulty rating: 2390
Small Hint:

The six pairwise sums split into three complementary pairs, each pair adding up to the total a+b+c+da + b + c + d of the set

Big Hint:

So x+y=3s1030,x + y = 3s - 1030, where the common pair total ss is a sum of two of the four given numbers; make ss as large as possible

Solution:

Let the set be {a,b,c,d}\{a, b, c, d\} with total s=a+b+c+d.s = a + b + c + d. The six pairwise sums come in three complementary pairs: (a+b)+(c+d)=(a+c)+(b+d)=(a+d)+(b+c)=s. \begin{aligned} &(a+b) + (c+d) \\ &= (a+c) + (b+d) \\ &= (a+d) + (b+c) = s. \end{aligned} No two of the pairings of 189,189, 320,320, 287,287, 234234 into two pairs give equal totals (509521,509 \ne 521, 476554,476 \ne 554, 423607423 \ne 607), so xx and yy are not paired with each other; each is paired with a given sum, and the remaining two given sums are paired together. Adding all six values, x+yx + y =3s(189+320+287+234)= 3s - (189 + 320 + 287 + 234) =3s1030,= 3s - 1030, where ss is the sum of two of the given numbers.

The largest choice is s=320+287=607,s = 320 + 287 = 607, giving x+y=36071030=791.x + y = 3 \cdot 607 - 1030 = 791. This is attained by the set {51.5, 137.5, 182.5, 235.5},\{51.5,\ 137.5,\ 182.5,\ 235.5\}, whose pairwise sums are 189,189, 234,234, 287,287, 320,320, 373,373, and 418,418, with 373+418=791.373 + 418 = 791.

6.

Find the sum of all positive integers nn such that n2+85n+2017\sqrt{n^2 + 85n + 2017} is an integer.

Answer: 195
Difficulty rating: 2450
Small Hint:

Set n2+85n+2017=m2n^2 + 85n + 2017 = m^2 and multiply by 44 so the left side becomes (2n+85)2+843(2n + 85)^2 + 843

Big Hint:

Factor 4m2(2n+85)24m^2 - (2n + 85)^2 as a difference of squares; 843=3281843 = 3 \cdot 281 has only two factorizations

Solution:

Suppose n2+85n+2017=m2n^2 + 85n + 2017 = m^2 for a positive integer m.m. Multiplying by 44 and completing the square gives (2n+85)2+843=4m2,(2n + 85)^2 + 843 = 4m^2, so (2m2n85)(2m+2n+85)=843=3281, \begin{aligned} &(2m - 2n - 85)(2m + 2n + 85) \\ &= 843 = 3 \cdot 281, \end{aligned} where 281281 is prime. Both factors are positive with the second one larger, so either 2m2n85=12m - 2n - 85 = 1 and 2m+2n+85=843,2m + 2n + 85 = 843, or 2m2n85=32m - 2n - 85 = 3 and 2m+2n+85=281.2m + 2n + 85 = 281.

The first system gives m=211m = 211 and n=168,n = 168, and indeed 1682+85168+2017168^2 + 85 \cdot 168 + 2017 =44521=2112.= 44521 = 211^2. The second gives m=71m = 71 and n=27,n = 27, with 272+8527+201727^2 + 85 \cdot 27 + 2017 =5041=712.= 5041 = 71^2.

The requested sum is 168+27=195.168 + 27 = 195.

7.

Find the number of integer values of kk in the closed interval [500,500][-500, 500] for which the equation log(kx)=2log(x+2)\log(kx) = 2\log(x + 2) has exactly one real solution.

Answer: 501
Difficulty rating: 2740
Small Hint:

The equation says kx=(x+2)2kx = (x + 2)^2 with the domain restrictions kx>0kx \gt 0 and x>2;x \gt -2; treat k<0k \lt 0 and k>0k \gt 0 separately

Big Hint:

For every k<0k \lt 0 the two graphs cross exactly once on (2,0);(-2, 0); for k>0k \gt 0 the quadratic x2+(4k)x+4x^2 + (4 - k)x + 4 needs a repeated positive root

Solution:

The equation requires x+2>0x + 2 \gt 0 and kx>0,kx \gt 0, and under those restrictions it is equivalent to kx=(x+2)2,kx = (x + 2)^2, that is, x2+(4k)x+4=0.x^2 + (4 - k)x + 4 = 0.

For k<0k \lt 0 the restrictions force 2<x<0.-2 \lt x \lt 0. On this interval kxkx decreases from 2k>0-2k \gt 0 to 00 while (x+2)2(x + 2)^2 increases from 00 to 4,4, so the graphs cross exactly once. Hence every one of the 500500 negative values of kk works, while k=0k = 0 makes log(kx)\log(kx) undefined.

For k>0k \gt 0 the restrictions force x>0.x \gt 0. The quadratic has root product 4,4, so any real roots have the same sign, and the discriminant (4k)216=k(k8)(4 - k)^2 - 16 = k(k - 8) is negative for 0<k<8.0 \lt k \lt 8. When k>8k \gt 8 there are two distinct positive roots (root sum k4>0k - 4 \gt 0), giving two solutions; only k=8k = 8 gives exactly one solution, the double root x=2.x = 2. In total 500+1=501500 + 1 = 501 values of kk work.

8.

Find the number of positive integers nn less than 20172017 such that 1+n+n22!+n33!+n44!+n55!+n66! \begin{aligned} &1 + n + \frac{n^2}{2!} + \frac{n^3}{3!} + \frac{n^4}{4!} \\ &{}+ \frac{n^5}{5!} + \frac{n^6}{6!} \end{aligned} is an integer.

Answer: 134
Difficulty rating: 2840
Small Hint:

Multiply by 6!=720:6! = 720: the sum is an integer exactly when 720720 divides n6+6n5+30n4n^6 + 6n^5 + 30n^4 +120n3+360n2+ 120n^3 + 360n^2

Big Hint:

Checking mod 22 and mod 33 forces nn to be a multiple of 6;6; write n=6k,n = 6k, and only the condition that 55 divides k(k+1)k(k + 1) survives

Solution:

Multiplying by 6!=720,6! = 720, the sum is an integer exactly when n6+6n5+30n4+120n3+360n2is divisible by 720. \begin{aligned} &n^6 + 6n^5 + 30n^4 \\ &{}+ 120n^3 + 360n^2 \\ &\text{is divisible by } 720. \end{aligned} If nn were odd, every term except n6n^6 would be even, making the total odd. If nn is not divisible by 3,3, then modulo 33 every term except n6n^6 vanishes while n61(mod3).n^6 \equiv 1 \pmod 3. So nn must be a multiple of 6.6.

Write n=6k.n = 6k. Then 30n4=72054k4,30n^4 = 720 \cdot 54k^4, 120n3=72036k3,120n^3 = 720 \cdot 36k^3, and 360n2=72018k2360n^2 = 720 \cdot 18k^2 are all divisible by 720,720, while n6+6n5=66k5(k+1).n^6 + 6n^5 = 6^6 k^5(k + 1). Since 66=26366^6 = 2^6 3^6 supplies the factors 242^4 and 323^2 of 720=24325,720 = 2^4 \cdot 3^2 \cdot 5, the condition reduces to k(k+1)k(k + 1) being divisible by 5,5, that is, k0k \equiv 0 or 4(mod5).4 \pmod 5.

For n=6k<2017n = 6k \lt 2017 we need 1k336.1 \le k \le 336. That range contains 6767 multiples of 55 and 6767 values with k4(mod5),k \equiv 4 \pmod 5, so there are 67+67=13467 + 67 = 134 such n.n.

9.

A special deck of cards contains 4949 cards, each labeled with a number from 11 to 77 and colored with one of seven colors. Each number-color combination appears on exactly one card. Sharon will select a set of eight cards from the deck at random. Given that she gets at least one card of each color and at least one card with each number, the probability that Sharon can discard one of her cards and still have at least one card of each color and at least one card with each number is pq,\frac{p}{q}, where pp and qq are relatively prime positive integers. Find p+q.p + q.

Answer: 13
Difficulty rating: 2990
Small Hint:

In such a hand exactly one number and exactly one color repeat; a card can be discarded only if a single card carries both repeats

Big Hint:

Count each type of hand: a rainbow 77-card set plus any extra card, versus hands where the repeated number and repeated color sit on four distinct cards

Solution:

Since the eight cards cover all seven numbers and all seven colors, exactly one number and exactly one color appear twice. Sharon can discard a card exactly when a single card carries both the repeated number and the repeated color: that card is then the unique discardable one, while if no card carries both, removing any card loses a number or a color.

Hands of the first type consist of a rainbow set of seven cards — one of each number and each color, which is one of 7!7! permutation patterns — plus any of the remaining 4242 cards, and every such hand arises exactly once this way: 7!42=2116807! \cdot 42 = 211680 hands. For the second type, choose the repeated number (77 ways) and the two colors of its cards ((72)=21\binom{7}{2} = 21 ways); the repeated color must be one of the other 55 colors, and the numbers of its two cards come from the remaining 66 numbers ((62)=15\binom{6}{2} = 15 ways); finally match the last four numbers to the last four colors (4!=244! = 24 ways). That is 72151524=2646007 \cdot 21 \cdot 5 \cdot 15 \cdot 24 = 264600 hands.

The probability is 211680211680+264600=49,\frac{211680}{211680 + 264600} = \frac{4}{9}, so p+q=4+9=13.p + q = 4 + 9 = 13.

10.

Rectangle ABCDABCD has side lengths AB=84AB = 84 and AD=42.AD = 42. Point MM is the midpoint of AD,\overline{AD}, point NN is the trisection point of AB\overline{AB} closer to A,A, and point OO is the intersection of CM\overline{CM} and DN.\overline{DN}. Point PP lies on the quadrilateral BCON,BCON, and BP\overline{BP} bisects the area of BCON.BCON. Find the area of CDP.\triangle CDP.

Answer: 546
Difficulty rating: 2920
Small Hint:

Use coordinates A(0,0),A(0,0), B(84,0),B(84,0), C(84,42),C(84,42), D(0,42);D(0,42); the lines CMCM and DNDN meet at O(12,24)O(12, 24)

Big Hint:

[BCON]=2184[BCON] = 2184 while [BCO]=1512,[BCO] = 1512, so PP lies on CO;\overline{CO}; place it so that [BPC]=1092[BPC] = 1092

Solution:

Place A=(0,0),A = (0, 0), B=(84,0),B = (84, 0), C=(84,42),C = (84, 42), D=(0,42),D = (0, 42), so M=(0,21)M = (0, 21) and N=(28,0).N = (28, 0). Line CMCM is y=x4+21y = \frac{x}{4} + 21 and line DNDN is y=423x2,y = 42 - \frac{3x}{2}, which meet at O=(12,24).O = (12, 24).

By the Shoelace Formula, quadrilateral BCONBCON has area 2184,2184, so each half must have area 1092.1092. Triangle BCOBCO alone has area 124272=1512>1092\frac{1}{2} \cdot 42 \cdot 72 = 1512 \gt 1092 (base BC,\overline{BC}, and OO is at horizontal distance 7272 from it), so the bisecting segment ends at a point PP on CO.\overline{CO}. For [BPC]=1092,[BPC] = 1092, the distance dd from PP to line BCBC must satisfy 1242d=1092,\frac{1}{2} \cdot 42 \cdot d = 1092, so d=52,d = 52, giving PP the xx-coordinate 8452=32.84 - 52 = 32. Since PP lies on line CO,CO, which is y=x4+21,y = \frac{x}{4} + 21, we get P=(32,29).P = (32, 29).

Triangle CDPCDP has base CD=84CD = 84 on the line y=42y = 42 and height 4229=13,42 - 29 = 13, so its area is 128413=546.\frac{1}{2} \cdot 84 \cdot 13 = 546.

11.

Five towns are connected by a system of roads. There is exactly one road connecting each pair of towns. Find the number of ways there are to make all the roads one-way in such a way that it is still possible to get from any town to any other town using the roads (possibly passing through other towns on the way).

Answer: 544
Difficulty rating: 3060
Small Hint:

The one-way roads work if and only if no town has all four of its roads inbound or all four outbound

Big Hint:

Count the bad assignments: 5265 \cdot 2^6 with an all-outbound town, the same with an all-inbound town, minus 54235 \cdot 4 \cdot 2^3 counted twice

Solution:

The assignment works if and only if no town has all four roads inbound or all four outbound. One direction is clear: an all-inbound town cannot be left, and an all-outbound town cannot be reached. Conversely, suppose every town has an inbound and an outbound road, yet town BB cannot be reached from town A.A. Let SS be the set of towns reachable from AA (including AA) and TT the set of towns from which BB is reachable (including BB). These sets are disjoint, every outbound road of a town in SS stays inside S,S, and every inbound road of a town in TT comes from inside T.T. Since AA has an outbound road, S2,|S| \ge 2, and similarly T2;|T| \ge 2; as S+T5,|S| + |T| \le 5, one of the two sets has exactly two towns. If S={A,X},S = \{A, X\}, the outbound roads of AA and of XX must both stay inside S,S, forcing the single road between them to point both ways — a contradiction (and T=2|T| = 2 is symmetric).

Now count assignments with a bad town among the 210=10242^{10} = 1024 total. Choosing a town to be all-outbound (55 ways) and orienting the remaining (42)=6\binom{4}{2} = 6 roads freely gives 526=3205 \cdot 2^6 = 320 assignments, and there can be at most one all-outbound town. Similarly 320320 assignments have an all-inbound town. Assignments with both are counted twice: choose the all-outbound town (55), the all-inbound town (44), and the other 33 roads freely, 5423=160.5 \cdot 4 \cdot 2^3 = 160. So 320+320160=480320 + 320 - 160 = 480 assignments fail.

The number that work is 1024480=544.1024 - 480 = 544.

12.

Circle C0C_0 has radius 1,1, and the point A0A_0 is a point on the circle. Circle C1C_1 has radius r<1r \lt 1 and is internally tangent to C0C_0 at point A0.A_0. Point A1A_1 lies on circle C1C_1 so that A1A_1 is located 9090^\circ counterclockwise from A0A_0 on C1.C_1. Circle C2C_2 has radius r2r^2 and is internally tangent to C1C_1 at point A1.A_1. In this way a sequence of circles C1,C_1, C2,C_2, C3,C_3, \ldots and a sequence of points on the circles A1,A_1, A2,A_2, A3,A_3, \ldots are constructed, where circle CnC_n has radius rnr^n and is internally tangent to circle Cn1C_{n-1} at point An1,A_{n-1}, and point AnA_n lies on CnC_n 9090^\circ counterclockwise from point An1,A_{n-1}, as shown in the figure below. There is one point BB inside all of these circles. When r=1160,r = \frac{11}{60}, the distance from the center of C0C_0 to BB is mn,\frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Answer: 110
Difficulty rating: 3060
Small Hint:

In the complex plane the center of Cn+1C_{n+1} equals the center of CnC_n plus (rnrn+1)in(r^n - r^{n+1})\,i^n

Big Hint:

The centers converge to the geometric series sum 1r1ir,\frac{1-r}{1-ir}, whose distance from the origin is 1r1+r2\frac{1-r}{\sqrt{1+r^2}}

Solution:

Work in the complex plane with C0C_0 centered at O0=0O_0 = 0 and A0=1,A_0 = 1, and let OnO_n be the center of Cn.C_n. Inductively, An=On+rnin:A_n = O_n + r^n i^n: this holds for n=0,n = 0, and since Cn+1C_{n+1} is internally tangent to CnC_n at An,A_n, its center is On+1=Anrn+1in;O_{n+1} = A_n - r^{n+1} i^n; then AnA_n sits in direction ini^n from On+1,O_{n+1}, so rotating 9090^\circ counterclockwise gives An+1=On+1+rn+1in+1.A_{n+1} = O_{n+1} + r^{n+1} i^{n+1}.

Therefore On+1OnO_{n+1} - O_n =(rnrn+1)in= (r^n - r^{n+1})\, i^n =(1r)(ir)n.= (1 - r)(ir)^n. The circles are nested, and their radii shrink to 0,0, so the common point BB is the limit of the centers: B=(1r)n=0(ir)n=1r1ir,B = (1 - r)\sum_{n=0}^{\infty} (ir)^n = \frac{1 - r}{1 - ir}, at distance 1r1ir=1r1+r2\frac{1 - r}{|1 - ir|} = \frac{1 - r}{\sqrt{1 + r^2}} from the origin.

For r=1160r = \frac{11}{60} this equals 4960372160=4961,\frac{\frac{49}{60}}{\frac{\sqrt{3721}}{60}} = \frac{49}{61}, so m+n=49+61=110.m + n = 49 + 61 = 110.

13.

For each integer n3,n \ge 3, let f(n)f(n) be the number of 33-element subsets of the vertices of a regular nn-gon that are the vertices of an isosceles triangle (including equilateral triangles). Find the sum of all values of nn such that f(n+1)=f(n)+78.f(n+1) = f(n) + 78.

Answer: 245
Difficulty rating: 3270
Small Hint:

Count by apex: each vertex is the apex of n12\lfloor \frac{n-1}{2} \rfloor isosceles triangles, but equilateral triangles get counted three times

Big Hint:

Write f(n)f(n) with a floor function and compute f(n+1)f(n)f(n+1) - f(n) separately in each residue class of nn modulo 66

Solution:

Count isosceles triangles by apex. For a vertex PP of a regular nn-gon, the isosceles triangles whose two equal sides meet at PP have their other two vertices symmetric about the diameter through P,P, giving n12\lfloor \frac{n-1}{2} \rfloor such pairs. Summing over all nn vertices counts each non-equilateral isosceles triangle once (it has one apex) and each equilateral triangle three times; equilateral triangles exist exactly when nn is a multiple of 3,3, and then there are n3\frac{n}{3} of them. Hence f(n)=nn12,f(n) = n \lfloor \frac{n-1}{2} \rfloor, minus 2n3\frac{2n}{3} when nn is a multiple of 3.3.

Writing n=6k+jn = 6k + j and computing f(n+1)f(n)f(n+1) - f(n) in each residue class gives 13k13k for j=0,j = 0, 3k3k for j=1,j = 1, 5k+15k + 1 for j=2,j = 2, 7k+37k + 3 for j=3,j = 3, 9k+69k + 6 for j=4,j = 4, and (k+2)-(k + 2) for j=5.j = 5. Setting each equal to 78:78: 13k=7813k = 78 gives k=6,k = 6, n=36;n = 36; 3k=783k = 78 gives k=26,k = 26, n=157;n = 157; 9k+6=789k + 6 = 78 gives k=8,k = 8, n=52;n = 52; and the other three cases have no positive integer solutions.

The sum of all such nn is 36+157+52=245.36 + 157 + 52 = 245.

14.

A 10×10×1010 \times 10 \times 10 grid of points consists of all points in space of the form (i,j,k),(i, j, k), where i,i, j,j, and kk are integers between 11 and 10,10, inclusive. Find the number of different lines that contain exactly 88 of these points.

Answer: 168
Difficulty rating: 3370
Small Hint:

A line with exactly 88 points either lies in a plane parallel to a face of the cube or has direction (±1,±1,±1)(\pm 1, \pm 1, \pm 1)

Big Hint:

Each of the 3030 face-parallel planes has 44 shifted diagonals with 88 points; for direction (1,1,1)(1,1,1) count start points with coordinates in {1,2,3}\{1, 2, 3\} using both 11 and 33

Solution:

Take a primitive direction vector (a,b,c)(a, b, c) for the line. Any nonzero component of absolute value 22 or more limits the line to at most 55 grid points, so every component is 00 or ±1.\pm 1. Lines parallel to a coordinate axis contain 1010 points, never 8.8. If exactly one component is 0,0, the line lies in one of the 3030 planes parallel to a face of the cube (33 orientations, 1010 positions), and within that 10×1010 \times 10 grid it is a diagonal of slope ±1\pm 1 shifted off center; the shift by 22 in either direction from each of the two main diagonals gives exactly 88 points. That is 44 lines per plane, and each lies in only one of the 3030 planes: 430=1204 \cdot 30 = 120 lines.

Otherwise the direction is one of the four space-diagonal directions (1,±1,±1)(1, \pm 1, \pm 1) up to sign; by symmetry, count lines parallel to (1,1,1)(1, 1, 1) and multiply by 4.4. Such a line (d+t, e+t, f+t)(d + t,\ e + t,\ f + t) meets the grid in 1010 (max(d,e,f)min(d,e,f))- (\max(d,e,f) - \min(d,e,f)) points, so exactly 88 points means maxmin=2.\max - \min = 2. Normalizing the base point so that min(d,e,f)=1,\min(d, e, f) = 1, we need (d,e,f)(d, e, f) with entries in {1,2,3}\{1, 2, 3\} using both 11 and 3:3: there are 2788+1=1227 - 8 - 8 + 1 = 12 of them, hence 1212 lines per direction and 412=484 \cdot 12 = 48 in all.

The total is 120+48=168.120 + 48 = 168.

15.

Tetrahedron ABCDABCD has AD=BC=28,AD = BC = 28, AC=BD=44,AC = BD = 44, and AB=CD=52.AB = CD = 52. For any point XX in space, define f(X)=AX+BXf(X) = AX + BX +CX+DX.+ CX + DX. The least possible value of f(X)f(X) can be expressed as mn,m\sqrt{n}, where mm and nn are positive integers, and nn is not divisible by the square of any prime. Find m+n.m + n.

Answer: 682
Difficulty rating: 3500
Small Hint:

The midpoints MM of AB\overline{AB} and NN of CD\overline{CD} lie on the common perpendicular bisector of those edges, and f(X)f(Q)f(X) \ge f(Q) for a point QQ on line MNMN

Big Hint:

Rotate DD about line MNMN into the plane AMN:AMN: then f(Q)=2(AQ+DQ)2AD,f(Q) = 2(AQ + D'Q) \ge 2AD', and the median length formula gives ADAD'

Solution:

Let MM and NN be the midpoints of AB\overline{AB} and CD.\overline{CD}. The medians from CC and from DD to AB\overline{AB} are equal, since triangles ABCABC and BADBAD are congruent by SSS;SSS; by the median length formula, 4MD2=2282+24424MD^2 = 2 \cdot 28^2 + 2 \cdot 44^2 522- 52^2 =2736,= 2736, so MC2=MD2=684.MC^2 = MD^2 = 684. Likewise NA=NB.NA = NB. Then MN,MN, as a median of the isosceles triangles MCDMCD and NAB,NAB, is perpendicular to both AB\overline{AB} and CD,\overline{CD}, so the 180180^\circ rotation about line MNMN swaps ABA \leftrightarrow B and CD.C \leftrightarrow D. Also MN2=MD2ND2MN^2 = MD^2 - ND^2 =684262= 684 - 26^2 =8.= 8.

For any point X,X, let XX' be its image under this rotation, and let QQ be the midpoint of XX,\overline{XX'}, which lies on line MN.MN. Then BX=AXBX = AX' and CX=DX,CX = DX', so f(X)=(AX+AX)+(DX+DX)2AQ+2DQ=f(Q), \begin{aligned} &f(X) = (AX + AX') \\ &{}+ (DX + DX') \\ &\ge 2AQ + 2DQ = f(Q), \end{aligned} because a median of a triangle is at most half the sum of the two adjacent sides. So it suffices to minimize f(Q)=2(AQ+DQ)f(Q) = 2(AQ + DQ) over points QQ on line MN.MN.

Rotate DD about line MNMN into the plane of AA and line MN,MN, on the opposite side of MNMN from A,A, landing at DD' with ND=ND=26.ND' = ND = 26. For QQ on line MN,MN, AQ+DQ=AQ+DQAD,AQ + DQ = AQ + D'Q \ge AD', with equality where segment AD\overline{AD'} crosses MN.MN. Since AMMNAM \perp MN and DNMND'N \perp MN with AM=26AM = 26 and ND=26,ND' = 26, AD2=(AM+ND)2+MN2=522+8=2712=4678. \begin{aligned} &AD'^2 = (AM + ND')^2 + MN^2 \\ &= 52^2 + 8 = 2712 \\ &= 4 \cdot 678. \end{aligned} Hence the minimum of ff is 2AD=4678,2AD' = 4\sqrt{678}, and since 678=23113678 = 2 \cdot 3 \cdot 113 is squarefree, m+n=4+678=682.m + n = 4 + 678 = 682.