Omo Winter 13 So Lnsbbbb

download Omo Winter 13 So Lnsbbbb

of 12

Transcript of Omo Winter 13 So Lnsbbbb

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    1/28

    The Online Math Open Winter ContestOfficial Solutions

    January 4, 2013–January 15, 2013

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    2/28

    Acknowledgments

    Contest Directors

    Ray Li, James Tao, Victor Wang

    Head Problem Writers

    Evan Chen, Ray Li, Victor Wang

    Additional Problem Contributors

    James Tao, Anderson Wang, David Yang, Alex Zhu

    Proofreaders and Test Solvers

    Evan Chen, Calvin Deng, Mitchell Lee, James Tao, Anderson Wang, David Yang, Alex Zhu

    Website ManagerRay Li

    LATEX/Document Manager

    Evan Chen

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    3/28

    Contest Information

    Format

    The test will start Friday, January 4 and end Tuesday, January 15 (ignore the previous deadline of Monday,January 14). You will have until 7pm EST on January 15 to submit your answers; see here  for submission

    procedures. The test consists of 50 short answer questions, each of which has a nonnegative integer answerno greater than 263 −2 = 9223372036854775806. The problem difficulties range from those of AMC problemsto those of Olympiad problems. Problems are ordered in roughly increasing order of difficulty.

    Team Guidelines

    Students may compete in teams of up to four people. Participating students must not have graduated fromhigh school. International students may participate. No student can be a part of more than one team. Themembers of each team do not get individual accounts; they will all share the team account.

    Each team will submit its final answers through its team account. Though teams can save drafts for theiranswers, the current interface does not allow for much flexibility in communication between team members.We recommend using Google Docs and Spreadsheets to discuss problems and compare answers, especially if 

    teammates cannot communicate in person. Teams may spend as much time as they like on the test beforethe deadline.

    Aids

    Drawing aids such as graph paper, ruler, and compass are permitted. However, electronic drawing aids arenot allowed. This is includes (but is not limited to) Geogebra and graphing calculators.  Published printand electronic resources are not permitted.  (This is a change from last year’s rules.)

    Four-function calculators are permitted on the Online Math Open. That is, calculators which perform onlythe four basic arithmetic operations (+-*/) may be used. Any other computational aids such as scientificand graphing calculators, computer programs and applications such as Mathematica, and online databasesare prohibited. All problems on the Online Math Open are solvable without a calculator. Four-function

    calculators are permitted only to help participants reduce computation errors.

    Clarifications

    Clarifications will be posted as they are answered. For the Winter 2012-2013 Contest, they will be postedhere. If you have a question about a problem, please email [email protected] with “Clari-fication” in the subject. We have the right to deny clarification requests that we feel we cannot answer.

    Scoring

    Each problem will be worth one point. Ties will be broken based on the “hardest” problem that a teamanswered correctly. Remaining ties will be broken by the second hardest problem solved, and so on. ProblemX  is defined to be “harder” than Problem  Y   if and only if 

    (i)   X  was solved by less teams than  Y , OR(ii)   X   and Y  were solved by the same number of teams and  X  appeared later in the test than  Y  .

    Note: This is a change from prior tiebreaking systems. However, we will still order the

    problems by approximate difficulty.

    Results

    After the contest is over, we will release the answers to the problems within the next day. If you have aprotest about an answer, you may send an email to [email protected] (Include “Protest”in the subject). Solutions and results will be released in the following weeks.

    http://www.artofproblemsolving.com/Forum/viewtopic.php?f=810&t=516211http://aops.com/Forum/viewtopic.php?f=810&t=515032http://aops.com/Forum/viewtopic.php?f=810&t=515032http://www.artofproblemsolving.com/Forum/viewtopic.php?f=810&t=516211

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    4/28

    January 2013 Winter OMO 2012-2013 Page 1

    1. Let x  be the answer to this problem. For what real number a  is the answer to this problem also  a − x?Answer.   0 .

    Solution.   a =  x, so  a − x = 0 must be the answer.This problem was proposed by Ray Li.

    2. The number 123454321 is written on a blackboard. Evan walks by and erases some (but not all) of thedigits, and notices that the resulting number (when spaces are removed) is divisible by 9. What is thefewest number of digits he could have erased?

    Answer.   2 .

    Solution.   The sum of the digits needs to be divisible by 9, so we need to remove 7 at minimum. Sincethere is no 7, we can remove a 2 and a 5 or a 3 and a 4: 2 digits.

    This problem was proposed by Ray Li. This solution was given by ahaanomegas on AoPS.

    3. Three lines m,  n, and     lie in a plane such that no two are parallel. Lines m  and  n  meet at an acuteangle of 14◦, and lines m  and    meet at an acute angle of 20◦. Find, in degrees, the sum of all possible

    acute angles formed by lines  n  and  .Answer.   40 .

    Solution.  There are two possible angles: 20◦ − 16◦  and 20◦ + 16◦  (note that both are acute), so thesum is 2 · 20◦  = 40◦.This problem was proposed by Ray Li.

    4. For how many ordered pairs of positive integers (a, b) with a,b

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    5/28

    January 2013 Winter OMO 2012-2013 Page 2

    Solution.  If at any point Micchell has  a  and  b  ratings of 4.0 and 3.0, respectively, his college potentialis   4a+3ba+b   = 4 −   ba+b . Thus after taking 40 classes, he has received exactly one submissiveness rating of 3.0. In order to get his college potential up to at least 3.995, he needs 4 −   1x ≥  3.995, where  x   is thenumber of total classes taken (including the original 40); solving, we get  x ≥ 200. Since  x  = 200 also

    suffices, Micchell needs to take at least 200 − 40 = 160 more classes.In other words, he should clearly just try to be a rock.

    This problem was proposed by Victor Wang.

    6. Circle S 1  has radius 5. Circle S 2  has radius 7 and has its center lying on  S 1. Circle  S 3  has an integerradius and has its center lying on S 2. If the center of  S 1   lies on S 3, how many possible values are therefor the radius of  S 3?

    Answer.   11 .

    Solution.  By the triangle inequality, the possible radii are those between 7 − 5 and 7 + 5, giving us11 possible values.

    This problem was proposed by Ray Li.

    7. Jacob’s analog clock has 12 equally spaced tick marks on the perimeter, but all the digits have beenerased, so he doesn’t know which tick mark corresponds to which hour. Jacob takes an arbitrary tickmark and measures clockwise to the hour hand and minute hand. He measures that the minute handis 300 degrees clockwise of the tick mark, and that the hour hand is 70 degrees clockwise of the sametick mark. If it is currently morning, how many minutes past midnight is it?

    Answer.   500 .

    Solution.   The hour’s degree from the closest tick mark is 10 degrees clockwise, which means 20minutes. This is 120 degrees clockwise from tick mark 12. So Jacob chooses tick mark 6, and thecurrent time is 8:20, so 500 minutes.

    This problem was proposed by Ray Li. This solution was given by chaotic iak on AoPS.

    8. How many ways are there to choose (not necessarily distinct) integers  a,b,c   from the set {1, 2, 3, 4}such that  a(b

    c) is divisible by 4?

    Answer.   28 .

    Solution.  Basic casework. Note that, if  a  = 1 or a  = 3, the power is going to be odd, so no change of 4-divisibility. The interesting part is  a  = 2 and a  = 4.

    If  a  = 2, as long as  bc ≥ 2, we’re good. If  b  = 1, bc = 1, so that fails. If  b  = 2,  b  = 3, or  b  = 4, we have4 choices of  c   for each, making 12.

    If  a  = 4, all combinations of  b  and  c  work. There are 42 = 16 ways we can do this.

    Thus, the answer is 12 + 16 = 28.

    This problem was proposed by Ray Li. This solution was given by ahaanomegas on AoPS.9. David has a collection of 40 rocks, 30 stones, 20 minerals and 10 gemstones. An operation consists of 

    removing three objects, no two of the same type. What is the maximum number of operations he canpossibly perform?

    Answer.   30 .

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    6/28

    January 2013 Winter OMO 2012-2013 Page 3

    Solution.  Each move uses at least one mineral or gemstone, so we cannot do better than 30. (Al-ternatively, as mcdonalds106 7 notes on AoPS, we can note that each move uses at least two stones,minerals, or gemstones.) On the other hand, this is easily achieved by taking a rock and a stone (andthen either a mineral or a gemstone) each time.

    This problem was proposed by Ray Li.

    10. At certain store, a package of 3 apples and 12 oranges costs 5 dollars, and a package of 20 apples and5 oranges costs 13 dollars. Given that apples and oranges can only be bought in these two packages,what is the minimum nonzero amount of dollars that must be spent to have an equal number of applesand oranges?

    Answer.   64 .

    Solution.  The (signed) difference between apples and oranges (aka apples - oranges) must be 0. Thefirst package gives a difference −9 while the second gives +15, so we need to have 5 of the first packagesand 3 of the second packages for 64 dollars. (Just to check, there are 75 apples and 75 oranges now.)

    This problem was proposed by Ray Li. This solution was given by chaotic iak on AoPS.

    11. Let  A,   B, and   C  be distinct points on a line with   AB   =   AC   = 1. Square  ABDE   and equilateraltriangle AC F  are drawn on the same side of line  B C . What is the degree measure of the acute angleformed by lines  E C   and B F ?

    Answer.   75 .

    Solution.  The desired angle is just  ∠F BC  + ∠EC B  =   180◦−120◦

    2   + 45◦  = 75◦, where we use the fact

    that AB  =  AF .

    This problem was proposed by Ray Li.

    12. There are 25 ants on a number line; five at each of the coordinates 1, 2, 3, 4, and 5. Each minute,one ant moves from its current position to a position one unit away. What is the minimum number of minutes that must pass before it is possible for no two ants to be on the same coordinate?

    Answer.   126 .

    Solution.  Consider the sum of the (absolute) distances from the original centroid (3) of the ants toeach of the ants. This quantity changes by at most 1 each time, so the answer is at least (0 + 1 + 1 +· · · + 1 2 + 1 2 ) − 5(0 + 1 + 1 + 2 + 2) = 126, which is clearly achievable (as long as we don’t go beyond3 ± 12).This problem was proposed by Ray Li.

    13. There are three flies of negligible size that start at the same position on a circular track with circum-ference 1000 meters. They fly clockwise at speeds of 2, 6, and  k  meters per second, respectively, wherek  is some positive integer with 7 ≤ k ≤ 2013. Suppose that at some point in time, all three flies meetat a location different from their starting point. How many possible values of  k  are there?

    Answer.   501 .

    Solution.   Working modulo 1000 (allowing fractional parts, as we do mod 1) tells us that preciselyk ≡ 2 (mod 4) work.This problem was proposed by Ray Li.

    14. What is the smallest perfect square larger than 1 with a perfect square number of positive integerfactors?

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    7/28

    January 2013 Winter OMO 2012-2013 Page 4

    Answer.   36 .

    Solution.  Clearly our number will either be of the form  p8 or p2q 2, so our answer is 62 = 36. (Anythingwith at least three distinct prime factors will be at least 302.)

    This problem was proposed by Ray Li.

    15. A permutation a1, a2, . . . , a13  of the numbers from 1 to 13 is given such that  ai >  5 for i  = 1, 2, 3, 4, 5.Determine the maximum possible value of 

    aa1 + aa2 + aa3 + aa4 + aa5 .

    Answer.   45 .

    Solution.   a1   through   a5  take up 5 numbers greater than 5, so we can’t do better than 13 + 12 +11 + 5 + 4 = 45. This is achieved whenever {a1, . . . , a5}  = {6, 7, 8, 9, 10}  and {a6, a7, a8, a9, a10}   ={4, 5, 11, 12, 13}.This problem was proposed by Evan Chen.

    16. Let   S 1   and   S 2   be two circles intersecting at points   A   and   B. Let   C   and   D   be points on   S 1   andS 2  respectively such that line  CD   is tangent to both circles and  A   is closer to line  CD   than   B. If ∠BC A = 52◦  and  ∠BDA  = 32◦, determine the degree measure of  ∠CB D.

    Answer.   48 .

    Solution.   Note that   ∠CB A   =   ∠DCA,∠DBA   =   ∠CDA. Let   ∠CB A   =   x,∠DBA   =   y; then∠CB D   =   x +  y,   ∠BC D  = 52 +  x,   ∠CDB  = 32 +  y. Therefore, 2(x +  y) + 52 + 32 = 180 yields∠CB D =   180−52−322   = 48

    ◦.

    This problem was proposed by Ray Li. This solution was given by thugzmath10 on AoPS.

    17. Determine the number of ordered pairs of positive integers (x, y) with  y < x ≤ 100 such that  x2 − y2and  x3 − y3 are relatively prime. (Two numbers are   relatively prime   if they have no common factorother than 1.)

    Answer.   99 .

    Solution.   Clearly we need  x − y = 1. It’s easy to check that gcd(x + y, x2 + xy + y2) = 1 for all suchx, y, so the answer is 99.

    This problem was proposed by Ray Li.

    18. Determine the absolute value of the sum

    2013sin0◦ + 2013sin1◦ + · · · + 2013 sin 359◦,where x  denotes the greatest integer less than or equal to  x.(You may use the fact that sin n◦   is irrational for positive integers  n  not divisible by 30.)

    Answer.   178 .Solution. x + −x = −1 when x  is not an integer, so from sin(x + π) = − sin(x) we get ans answeris −178 + 1 + −1 = 0.This problem was proposed by Ray Li.

    19.   A ,B,C  are points in the plane such that  ∠ABC  = 90◦. Circles with diameters BA  and  B C   meet atD. If  B A = 20 and  B C  = 21, then the length of segment  B D  can be expressed in the form   mn   wherem and  n  are relatively prime positive integers. What is  m + n?

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    8/28

    January 2013 Winter OMO 2012-2013 Page 5

    Answer.   449 .

    Solution.  Let the circle with diameter  B A  intersect  AC  at E . Similarly, let the circle with diameterBC  intersect AC  at F . We easily find  ∠BDA = 90 and  ∠BF C  = 90, so  E  and F  are the same point,the intersection of  AC  and the altitude from  B . The answer follows.

    This problem was proposed by Ray Li. This solution was given by BOGTRO on AoPS.

    20. Let   a1, a2, . . . , a2013   be a permutation of the numbers from 1 to 2013. Let  An   =  a1+a2+···+an

    n   forn   = 1, 2, . . . , 2013. If the smallest possible difference between the largest and smallest values of A1, A2, . . . , A2013   is

      mn , where  m  and  n  are relatively prime positive integers, find  m + n.

    Answer.   3 .

    Solution.   Looking at |A1 −  A2|   we see the answer is at least 1/2. Equality can be achieved by1007, 1008, 1006, 1009, 1005, . . ..

    This problem was proposed by Ray Li.

    21. Dirock has a very neat rectangular backyard that can be represented as a 32

    ×32 grid of unit squares.

    The rows and columns are each numbered 1, 2, . . . , 32. Dirock is very fond of rocks, and places a rockin every grid square whose row and column number are both divisible by 3. Dirock would like to builda rectangular fence with vertices at the centers of grid squares and sides parallel to the sides of theyard such that

    a) The fence does not pass through any grid squares containing rocks;

    b) The interior of the fence contains exactly 5 rocks.

    In how many ways can this be done?

    Answer.   1920 .

    Solution.   5 rocks? In a rectangle? Oh no I guess the only way to do that is have 5 rocks in a row.What a rocky start to a rocky problem. Or maybe it’s not that unfortunate.

    For each row (with rocks), there are 10 rocks so there are 6 sequences of 5 consecutive rocks. There are10 rows, and also we can have both vertical and horizontal groups of rocks, so we have the 6×10×2 = 120groups of 5 abiotic likenesses of Geodudes (substitute Gravelers and Golems as necessary).

    Let’s construct a frame for each of our 5-rock gardens. There are 2 possible top boundaries, 2 possiblelower boundaries, 2 possible left boundaries, and 2 possible right boundaries, so there are 2 4 = 16different frames we can choose from. And what do you know, everything is  conveniently  symmetric:it’s the same for every group of rocks. WOW WHAT A COINCIDENCE I guess we must be lucky toget this problem huh

    So by the multiplication principle (which everyone knows but like no one actually knows by name),

    our answer is 120 × 16 = 1920 = year of ratification of 19th amendment so clearly the test writerswanted to make a point about women’s suffrage.

    This problem was proposed by Ray Li. This solution was given by Past on AoPS.

    22. In triangle ABC ,  AB  = 28,  AC  = 36, and  BC   = 32. Let  D  be the point on segment  BC   satisfying∠BAD  =  ∠DAC , and let  E  be the unique point such that  DE    AB  and line  AE   is tangent to thecircumcircle of  ABC . Find the length of segment  AE .

    Answer.   18 .

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    9/28

    January 2013 Winter OMO 2012-2013 Page 6

    Solution.  We have BD =   28·3228+36  = 14 and CD = 32−14 = 18. Since DE   AB, ∠CDE  = ∠CB A and∠BAD  =  ∠EDA. But  ∠ABC  =  ∠CAE , so it follows that  ∠CDE  =  ∠CB A   (which implies  AECDis cyclic),  ∠CAD  =  ∠EDA  and  ∠CDA =  ∠EAD. As  AD  is the common segment of triangles  C ADand E DA, by ASA Congurence Postulate we have CAD ∼= EDA. Therefore, AE  =  C D = 18.

    This problem was proposed by Ray Li. This solution was given by thugzmath10 on AoPS.

    23. A set of 10 distinct integers   S   is chosen. Let   M  be the number of nonempty subsets of   S   whoseelements have an even sum. What is the minimum possible value of  M ?

    Answer.   511 .

    Clarifications.

    •   S  is the “set of 10 distinct integers” from the first sentence.Solution.  If all the elements are even we get 210 −1. If at least one is odd then we get at least   12 210 −1,which is achieved by all 1s, for instance.

    This problem was proposed by Ray Li.

    24. For a permutation  π  of the integers from 1 to 10, define

    S (π) =

    9i=1

    (π(i) − π(i + 1)) · (4 + π(i) + π(i + 1)),

    where π(i) denotes the ith element of the permutation. Suppose that  M  is the maximum possible valueof  S (π) over all permutations  π  of the integers from 1 to 10. Determine the number of permutationsπ   for which S (π) =  M .

    Answer.   40320 .

    Solution.  The sum telescopes, giving us an answer of 8! = 40320.

    This problem was proposed by Ray Li.

    25. Positive integers x, y,z ≤ 100 satisfy

    1099x + 901y + 1110z = 59800

    109x + 991y + 101z = 44556

    Compute 10000x + 100y + z.

    Answer.   34316 .

    Solution.  Subtracting the first equation from 11 times the second, we obtain 100x + 10000y +  z   =430316. Since  x, y,z ≤ 100 this implies (x,y,z) = (3, 43, 16), so 10000x + 100y + z  = 34316.

    Solution 2.   Taking the equations modulo 100, we obtain −

    x +  y  + 10z ≡

     0 (mod 100) and 9x−9y  + z  ≡   56 (mod 100), whence 91z  ≡   56 (mod 100). But 9 ·  11 = 99 ≡ −1 (mod 100) means

    z ≡ 11 · 91z ≡ 11 · 56 ≡ 16 (mod 100), so  z  = 16.On the other hand, subtracting the former from 10 times the latter gives −9x +9009y−100z = 385760,so

    385760 + 1600 + 9 ≤ 9009y ≤ 385760 + 1600 + 900 =⇒   y = 43,since 1 ≤ x,y,z ≤ 100 are positive integers (observe that 9009 · 43 = 387387). Finally,  x ≡ y + 10z ≡43 + 60 ≡ 3 (mod 100), so (x,y,z) = (3, 43, 16) and 10000x + 100y + z = 34316.

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    10/28

    January 2013 Winter OMO 2012-2013 Page 7

    This problem was proposed by Evan Chen. The second solution was given by Victor Wang.

    26. In triangle ABC ,  F  is on segment  AB  such that  C F   bisects  ∠ACB . Points  D  and E  are on line  C F such that lines  AD,BE  are perpendicular to  C F .   M   is the midpoint of  AB . If  M E  = 13,  AD = 15,

    and B E  = 25, find  AC  + CB .

    Answer.   104 .

    Solution.   Note that BE F   is similar to ADF , with scale factor 5 to 3. If we let EF   = 5a, thenDF   = 3a. Also note that ADC   is similar to BE C , with scale factor 5 to 3. Since   DE   = 8a,CD  = 12a. By Pythagorean theorem, AF   = 3

    √ a2 + 25 and  B F   = 5

    √ a2 + 25. Also by Pythagorean

    theorem, AE  =√ 

    64a2 + 125.

    By Stewart’s theorem on triangle AE B  using M E ,  AM , and  BM  as sides in the calculation, we have(letting AM  = BM  = x)

    625x + (64a2 + 225)x = 2x · x · x + 2x · 169,

    so 850 + 64a2 = 2x2 + 338 and   x   = 4√ 

    2a2 + 16. So 2x   =   AB   = 8√ 

    2a2 + 16 but this also equals

    AF  + BF   or 8√ a2 + 25 so equating them we get  a  = 3 and  AC  = 39,  B C  = 65 so the answer is then104.

    This problem was proposed by Ray Li.

    27. Geodude wants to assign one of the integers 1, 2, 3, . . . , 11 to each lattice point (x,y,z) in a 3D Cartesiancoordinate system. In how many ways can Geodude do this if for every lattice parallelogram  ABCD,the positive difference between the sum of the numbers assigned to   A   and   C   and the sum of thenumbers assigned to  B   and  D  must be a multiple of 11? (A   lattice point  is a point with all integercoordinates. A   lattice parallelogram   is a parallelogram with all four vertices lying on lattice points.Here, we say four not necessarily distinct points  A, B,C,D  form a  parallelogram   ABCD  if and only if the midpoint of segment  AC  coincides with the midpoint of segment  B D.)

    Answer.   14641 .

    Clarifications.

    •  The “positive difference” between two real numbers  x  and  y  is the quantity |x − y|. Note thatthis may be zero.

    •  The last sentence was added to remove confusion about “degenerate parallelograms.”Solution.   Let f (x,y,z) be the number written at (x,y,z), and g(x,y,z) =  f (x,y,z)−f (0, 0, 0). Thenconsidering all parallelograms  ABCD  with  A  = (0, 0, 0), we get

    11 | g(x1 + x2, y1 + y2, z1 + z2) − g(x1, y1, z1) − g(x2, y2, z2)

    for all integers  x1, y1, . . . , z2. But then it’s not hard to prove

    g(x,y,z) ≡ xg(1, 0, 0) + yg(0, 1, 0) + zg(0, 0, 1) (mod 11)for all integers  x,y, z. (Try it!)

    On the other hand, any choice of  f (0, 0, 0),  g(1, 0, 0), g (0, 1, 0), and  g(0, 0, 1) yields a distinct workingassignment f  (Why?), so the desired answer is 114 = 14641.

    This problem was proposed by Victor Wang.

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    11/28

    January 2013 Winter OMO 2012-2013 Page 8

    28. Let  S  be the set of all lattice points (x, y) in the plane satisfying |x| + |y| ≤ 10. Let  P 1, P 2, . . . , P  2013be a sequence of 2013 (not necessarily distinct) points such that for every point  Q   in  S , there existsat least one index   i   such that 1 ≤  i ≤  2013 and  P i   =  Q. Suppose that the minimum possible valueof  |P 1P 2| + |P 2P 3| + · · · + |P 2012P 2013|  can be expressed in the form  a + b√ c, where a, b, c  are positiveintegers and  c   is not divisible by the square of any prime. Find a  + b + c. (A   lattice point   is a pointwith all integer coordinates.)

    Answer.   222 .

    Clarifications.

    •   k = 2013, i.e. the problem should read, “. . . there exists at least one index i such that 1 ≤ i ≤ 2013. . . ”. An earlier version of the test read 1 ≤ i ≤ k.

    Solution.   More generally, let  S n  be the set of all lattice points (x, y) such that |x| + |y| ≤  n. Color(x, y) black if  x  + y − n   is even and white otherwise. Notice that there are (n + 1)2 black points andn2 white points, so there are at least 2n  segments in this broken line that go from a black point to ablack point, and the length of each such segment is at least

    √ 2. There are 2n2 + 2n total segments, so

    the length of the broken line is at least 2n2 + 2n√ 

    2. The construction is not hard to find (basically a

    spiral).This problem was proposed by Anderson Wang.

    29. Let φ(n) denote the number of positive integers less than or equal to  n  that are relatively prime to  n,and let d(n) denote the number of positive integer divisors of  n. For example,  φ(6) = 2 and  d(6) = 4.Find the sum of all odd integers  n ≤ 5000 such that n | φ(n)d(n).Answer.   2903 .

    Solution.  Note 38 > 5000, so all primes dividing  n  are at most 8 and thus 3, 5, or 7. Doing caseworkon the set of primes (hardest part is 36 · 7 = 5103 >  5000) we get 1 + 32 + 35 + 54 + 34 · 52.This problem was proposed by Alex Zhu.

    30. Pairwise distinct points  P 1, P 2, . . . , P  16  lie on the perimeter of a square with side length 4 centered atO   such that |P iP i+1|  = 1 for  i  = 1, 2, . . . , 16. (We take P 17  to be the point  P 1.) We construct pointsQ1, Q2, . . . , Q16   as follows: for each  i, a fair coin is flipped. If it lands heads, we define  Qi  to be  P i;otherwise, we define   Qi   to be the reflection of   P i   over   O. (So, it is possible for some of the  Qi   to

    coincide.) Let D  be the length of the vector −−→OQ1 +

    −−→OQ2 + · · · + −−−→OQ16. Compute the expected value

    of  D2.

    Answer.   88 .

    Solution.   What’s

    (±a ± b ± c)2 over all 23 = 8 choices of signs depends only on a2 + b2 + c2. Thisgeneralizes!

    This problem was proposed by Ray Li.

    31. Beyond the Point of No Return is a large lake containing 2013 islands arranged at the vertices of aregular 2013-gon. Adjacent islands are joined with exactly two bridges. Christine starts on one of theislands with the intention of burning all the bridges. Each minute, if the island she is on has at leastone bridge still joined to it, she randomly selects one such bridge, crosses it, and immediately burns it.Otherwise, she stops.

    If the probability Christine burns all the bridges before she stops can be written as   mn   for relativelyprime positive integers  m  and  n, find the remainder when  m + n  is divided by 1000.

    Answer.   113 .

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    12/28

    January 2013 Winter OMO 2012-2013 Page 9

    Solution.   We either cycle through the whole 2013-gon first (after which Christine will automaticallysucceed) or “retrace” first right after passing through  k ∈ [1, 2012] bridges. In the first case we have aprobability of 

    (4/4)(2/3)2012(2/2)(1/1)2012 = (2/3)2012;

    in the second we have

    (4/4)(2/3)k−1(1/3)(1/1)k−1(2/2)(2/3)2012−k(1/1)2013−k = (1/3)(2/3)2011.

    Summing up we get 1007(2/3)2012 so  m  = 1007 · 22012 and  n  = 32012 (since 3     1007). Our answer isthus

    1007 · 22012 + 32012 ≡ 7 · 212 + 312 ≡ 113 (mod 1000).(To speed up calculations, we can work mod 8 and mod 125 first and then use CRT.)

    This problem was proposed by Evan Chen.

    32. In ABC   with incenter   I ,  AB  = 61,   AC  = 51, and  BC   = 71. The circumcircles of triangles AIBand  AIC  meet line  BC  at points  D   (D =  B ) and  E   (E  =  C ), respectively. Determine the length of 

    segment  DE .Answer.   41 .

    Solution.   Angle chasing gives IDC  ∼= IAC , so   CA   =   CD   and similarly,   BA   =   BE . ThusDE  =  BE  + CD − BC  =  AB + AC − BC  = 41.Comment.   I  is the circumcenter of  ADE , and D, E  always lie on the same side of line  AI  as B, C ,respectively. This gives us another way to define  D, E .

    This problem was proposed by James Tao.

    33. Let  n  be a positive integer. E. Chen and E. Chen play a game on the n2 points of an  n × n   latticegrid. They alternately mark points on the grid such that no player marks a point that is on or insidea non-degenerate triangle formed by three marked points. Each point can be marked only once. The

    game ends when no player can make a move, and the last player to make a move wins. Determine thenumber of values of  n  between 1 and 2013 (inclusive) for which the first player can guarantee a win,regardless of the moves that the second player makes.

    Answer.   1007 .

    Solution.   If  n   is odd, the first player should take the center square. Then for the second player’smove, the first player should choose the reflection across the center square. It is clear that this will notbe in the convex hull of the chosen points. So here the first player always wins.

    If  n  is even, then the second player should take the reflection across the center square. So the secondplayer always win in this case.

    The answer is thus 1007.

    This problem was proposed by Ray Li. This solution was given by Yang Liu.

    34. For positive integers n, let s(n) denote the sum of the squares of the positive integers less than or equalto n  that are relatively prime to  n. Find the greatest integer less than or equal to

    n|2013

    s(n)

    n2  ,

    where the summation runs over all positive integers  n  dividing 2013.

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    13/28

    January 2013 Winter OMO 2012-2013 Page 10

    Answer.   671 .

    Solution.   We have n

    |N 

    s(n)

    n2  =

     12 + 22 + · · · + N 2N 2

      = (N  + 1)(2N  + 1)

    6N   .

    Solution 2.   For d | n, let f (n, d) equal n/dk=1(dk)2 =   n(n+d)(2n+d)6d   if  d   is square-free and 0 otherwise.Then by PIE, we have

    s(n) =d|n

    (−1)ω(d)f (n, d)

    = n

    6

     p|n(1 − p) + 3n(0) + 2n2

     p|n

    1 −  1

     p

    = n

    6  p|n

    (1 − p) +  n2

    3 φ(n)

    for n > 1 (if  n  = 1 the 3n  term doesn’t cancel out, so we instead have  s(1) = 1), where  ω(m) denotesthe number of distinct prime factors of  m. It follows that

    d|n

    s(d)

    d2  = 1 +

     1

    3

    1

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    14/28

    January 2013 Winter OMO 2012-2013 Page 11

    Solution.  This bijects to the number of ways of placing 8 nonintersecting 3 ×3 squares in a 9 ×9 grid.3-color the columns  A, B , C , A, . . .. Label the 9 × 9 grid with (i, j) (row  i, column j ). If we don’t have(i, j) ≡ (2, 2) (mod 3), we can get a lot of restrictions. Identify squares by centers. For stuff symmetric(under rotation or reflection) to (3, 3), (3, 4), (4, 3), (4, 4) we can’t have any squares (or else we kill at

    least 4 A’s; for the symmetric squares we just rotate/reflect the 3-coloring as needed).We now show that in every working configuration, at least two rows or two columns of {2, 5, 8}×{2, 5, 8}are filled out* (and these all trivially work, so it reduces to PIE). If all squares are (2 , 2) (mod 3) thisis obvious. Otherwise up to rotation/reflection at least one of (2, 3), (2, 4), (5, 3), (5, 4) is used. If wehave (2, 3) or (2, 4) then we kill 3 A’s, which forces all other A’s to be used, so focusing on edges andcorners progressively we get

    (5, 2) =⇒   (8, 2), (5, 5) =⇒   (8, 5) =⇒   (8, 8) =⇒   (5, 8)so {5, 8} × {2, 5, 8}  are filled out, as desired. If we have (5, 3) or (5, 4) then it’s similar; we kill 3 A’swhich forces (2, 2) =⇒   (2, 5) =⇒   (2, 8) and also (8, 2) =⇒   (8, 5) =⇒   (8, 8), so {2, 8} × {2, 5, 8} arefilled out. By PIE the answer is 2 · 3(9−2)−22 = 60 minus the number of guys with all squares (2, 2)(mod 3), so 60 − 9 = 51.

    *One may also draw a 3 × 3 subgrid and note that if a 3 × 3 square contains part of a boundary linein its interior, say in the  ith row, then if  i  = 1 or  i = 3, the  ith row of the 3 × 3 subgrid intersects atmost 1 other 3 × 3 square. On the other hand, if   i  = 2, we can show that the first or third columnmust have such a line instead. (Why?)

    This problem was proposed by Ray Li.

    36. Let  ABCD  be a nondegenerate isosceles trapezoid with integer side lengths such that  B C    AD  andAB   =  B C   =  CD. Given that the distance between the incenters of triangles ABD   and  ACD   is 8!,determine the number of possible lengths of segment  AD.

    Answer.   337 .

    Solution.  Darn apparently you can bash this, and you don’t need the observation that the incentersare on the diagonals, but i think the NT part is still nice, because the bound that  AB

    ·3 > AD makes

    the counting work out perfectly.We get 8! =  AD −  AB+AD−BD2   −  DC +DA−AC 2   = BD − AB. Let  x  =  AB  = B C  = C D  and  y  = AD;then  BD  =

     x2 + xy. The requirement 3x > y   eventually reduces everything to  x | 8!2 = 214345272

    such that  x > 8!, so the answer is   15·5·3·3−12   = 337.

    This problem was proposed by Ray Li.

    37. Let  M  be a positive integer. At a party with 120 people, 30 wear red hats, 40 wear blue hats, and50 wear green hats. Before the party begins, M   pairs of people are friends. (Friendship is mutual.)Suppose also that no two friends wear the same colored hat to the party.

    During the party,  X  and Y  can become friends if and only if the following two conditions hold:

    a) There exists a person  Z  such that  X  and Y  are both friends with  Z . (The friendship(s) between

    Z, X  and Z, Y   could have been formed during the party.)b)   X  and Y  are not wearing the same colored hat.

    Suppose the party lasts long enough so that all possible friendships are formed. Let  M 1  be the largestvalue of   M   such that regardless of which  M   pairs of people are friends before the party, there willalways be at least one pair of people  X  and Y  with different colored hats who are not friends after theparty. Let M 2  be the smallest value of  M  such that regardless of which  M  pairs of people are friendsbefore the party, every pair of people  X  and  Y   with different colored hats are friends after the party.Find M 1 + M 2.

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    15/28

    January 2013 Winter OMO 2012-2013 Page 12

    Answer.   4749 .

    Clarifications.

    •  The definition of  M 2  should read, “Let  M 2  be the   smallest  value of  M   such that. . . ”. An earlierversion of the test read “largest value of  M ”.

    Solution.   View as a tripartite graph with components of size 30, 40, 50. The condition just meansthat connected components are preserved and become complete at the end (i.e. with all edges filledin).

    For  M  = 30 + 40 + 50 − 1 we would be able to find a spanning tree of the complete tripartite graph(where every two edges are connected/people are friends). Furthermore, any connected graph on 120vertices has at least 119 edges (achieved by a tree), so  M 1  = 118.

    On the other hand, the largest connected component (in terms of edges) not containing all vertices has(50 − 1) · 40 + (50 − 1) · 30 + 40 · 30 = 4630 edges, whence  M 2  = 4631.Thus  M 1 + M 2  = 4749.

    This problem was proposed by Victor Wang.

    38. Triangle   ABC   has sides   AB   = 25,   BC   = 30, and   CA   = 20. Let   P, Q  be the points on segmentsAB,AC , respectively, such that  AP  = 5 and  AQ = 4. Suppose lines B Q  and  C P   intersect at  R  andthe circumcircles of  BP R  and CQR  intersect at a second point  S  =  R. If the length of segmentSA  can be expressed in the form   m√ 

    n  for positive integers  m, n, where  n  is not divisible by the square

    of any prime, find  m + n.

    Answer.   166 .

    Solution.   Let t  =   15 . Invert about A  with power  R2 = tAB · AC  = AQ · AB = AP  · AC   (i.e. radius

    R) and reflect about the angle bisector of  ∠BAC   to get  C    =  P ,   Q   =  B,   B   =  Q,   P    =  C . Since(ABSQ) and (ACSP ) are cyclic,   S    =  BQ ∩ C P    =  QB ∩ P C   =  R. Thus AS   =   R2AS    =   R

    2

    AR . ByCeva’s theorem,  R ∈ AM  where  M  is the midpoint of  B C . Yet Menelaus yields

    RAMA

    MBCB

    CP RP 

      = 1 =⇒   ARAM 

      = 2   P QP Q + BC 

      =   2tt + 1

    .

    But it’s well-known that 4AM 2 + a2 = 2(b2 + c2), so

    SA  =  tbc2t

    1+tAM  = (1 + t)

      bc

    2AM   =

     6

    5

    (5 · 5)(5 · 4) 2(5 · 5)2 + 2(5 · 4)2 − (5 · 6)2 = 6

      (5)(4) 2(5)2 + 2(4)2 − 62 =

      120√ 46

    ,

    giving us an answer of 120 + 46 = 166.

    Comment.   Inspired by 2009 Balkan Math Olympiad Problem 2.  We can also use complex numbers(based on spiral similarity).

    This problem was proposed by Victor Wang.

    39. Find the number of 8-digit base-6 positive integers (a1a2a3a4a5a6a7a8)6 (with leading zeros permitted)such that (a1a2 . . . a8)6 |  (ai+1ai+2 . . . ai+8)6   for   i  = 1, 2, . . . , 7, where indices are taken modulo 8 (soa9  =  a1,  a10  =  a2, and so on).

    Answer.   40 .

    http://www.aops.com/Forum/viewtopic.php?f=47&t=274320&http://www.aops.com/Forum/viewtopic.php?f=47&t=274320&

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    16/28

    January 2013 Winter OMO 2012-2013 Page 13

    Solution.  Call such an integer  good ; then  n  = (a1a2 . . . a8)6  is good if and only if 

    n | gcd(a1, a2, . . . , a8)(68 − 1).(Why?) Call a good number with gcd of digits equal to 1   primitive .

    Now note that 68 − 1 = (6 − 1)(6 + 1)(62 + 1)(64 + 1) and 6 − 1, 6 + 1, 62 + 1, 64 + 1 are all prime,so every positive divisor   d  of 68 − 1 has all ones and zeros if 6 − 1 = 5     d  and all five and zeros if 6 − 1 = 5 | d. (Prove this—think binary!) But   68−16−1   has exactly 23 = 8 positive divisors, so there areexactly 8 primitive good numbers. Furthermore, these 8 numbers have digits all equal to 0 or 1, so wecan establish a 1-to-5 correspondence between the set of primitive good numbers and the set of goodnumbers (each primitive one corresponds to its first 5 multiples). Hence there are exactly 8 · 5 = 40good numbers.

    Comment.   Inspired by http://en.wikipedia.org/wiki/Cyclic_number.

    This problem was proposed by Victor Wang.

    40. Let  ABC  be a triangle with  AB  = 13,  BC  = 14, and  AC   = 15. Let  M  be the midpoint of  BC   andlet Γ be the circle passing through  A  and tangent to line B C  at M . Let Γ intersect lines  AB  and AC 

    at points  D  and E , respectively, and let N  be the midpoint of  DE . Suppose line  M N   intersects linesAB  and  AC  at points  P   and  O , respectively. If the ratio M N   : N O :  OP  can be written in the forma :  b  :  c  with  a, b, c  positive integers satisfying gcd(a,b,c) = 1, find  a + b + c.

    Answer.   225 .

    Solution.   Menelaus on MOC   and N OE   give   MP OP  OACA CBMB  = 1 and   NP OP  OAEA EDND  = 1, respectively;dividing yields   MP NP    =

      CAEA , whence power of a point gives

      MP MN    =

      CACE   =

      CA2

    CM 2 . Similarly,  MOMN    =

      BABD   =

    BA2

    BM 2 . It’s now easy to compute  M N   : N O :  OP  = a2 : 4c2 − a2 : 4b2 − 4c2 = 49 : 120 : 56.

    This problem was proposed by James Tao.

    41. While there do not exist pairwise distinct real numbers a, b, c satisfying a2 + b2 +c2 = ab +bc+ ca, theredo exist complex numbers with that property. Let  a, b, c be complex numbers such that  a2 + b2 + c2 =

    ab + bc + ca and |a + b + c| = 21. Given that |a − b| = 2√ 

    3, |a| = 3√ 

    3, compute |b|2

    + |c|2

    .Clarifications.

    •  The problem should read |a + b + c| = 21. An earlier version of the test read |a + b + c| = 7; thatvalue is incorrect.

    • |b|2 + |c|2 should be a positive integer, not a fraction; an earlier version of the test read “. . . forrelatively prime positive integers  m  and  n. Find  m + n.”

    Answer.   132 .

    Solution.   Equilateral triangle abc exists if and only if the center  g  =   a+b+c3   exists. More precisely,the condition on (a, g) is that |a| = 3√ 3, |g| = 7, and |g − a| =   2

    √ 3

    2cos30◦  = 2. By the triangle inequality,

    this can happen if and only if  |3√ 3 − 7| ≤ 2 ≤ 3√ 3 + 7, which is indeed true.Now that we’ve proven existence, note that   a,b,c   form the vertices of an equilateral triangle, so

    |a − b| = |b − c| = |c − a|, whence3(|a|2 + |b|2 + |c|2) = |a − b|2 + |b − c|2 + |c − a|2 + |a + b + c|2 = 3(2

    √ 3)2 + 212 = 477.

    Thus |b|2 + |c|2 =   4773   − (3√ 

    3)2 = 132.

    Comment.  A straightforward way to prove that  a, b, c  form the vertices of an equilateral triangle inthe complex plane is to use the quadratic formula. (Try it!) Otherwise, it’s rather difficult to discoverthe factorization (a + bω +  cω2)(a + bω2 + cω) of  a2 + b2 + c2 − ab − bc − ca, where  ω   is a primitivethird root of unity.

    http://en.wikipedia.org/wiki/Cyclic_numberhttp://en.wikipedia.org/wiki/Cyclic_numberhttp://en.wikipedia.org/wiki/Cyclic_number

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    17/28

    January 2013 Winter OMO 2012-2013 Page 14

    This problem was proposed by Ray Li.

    42. Find the remainder when100

    i=0

    (1−

    i2 + i4)

    is divided by 101.

    Answer.   9 .

    Solution.   Let  ω  =  e2πi/12 and  z  = e2πi/100; the key idea is that the symmetric sums of (x − g)(x −g2) · · · (x − g100) and (x − z)(x − z2) · · · (x − z100) are congruent mod 101, so the product is congruentmod 101 to the result (an integer) of 

    100j=1

    (z4j − z2j + 1) =100j=1

    (zj − ω)(zj − ω5)(zj − ω7)(zj − ω11).

    Using the factorization of  x

    100

    − 1, this boils down to(ω100 − 1)(ω500 − 1)(ω700 − 1)(ω1100 − 1) = (ω4 − 1)2(ω8 − 1)2 = 32,

    since ω 4, ω8 are the two primitive 3rd roots of unity.

    Solution 2.  Primitive roots suffice. Let  g  be a primitive root modulo 101. Then, the product can bewritten in the form

    1≤i≤100i2≡−1 (mod 101)

    i6 + 1

    i2 + 1

    Now because  g100 = 1, we can show that the multisets {i6 |  1 ≤ i ≤ 100}  and {i2 |  1 ≤  i ≤  100}  areequivalent modulo 101. If we delete the elements

    −1 (which each appear twice) from both, the sets are

    still the same; in particular, their products are the same. Finally, this product is not zero. So, in ouroriginal product, almost all of the numerator and denominator cancel out except for the zeros, whichwe handle manually:

    106 + 1

    102 + 1 ·  90

    6 + 1

    902 + 1 = (104 − 102 + 1)(904 − 902 + 1) ≡ 3 · 3 = 9 (mod 101).

    This problem was proposed by Victor Wang. The second solution was given by Evan Chen.

    43. In a tennis tournament, each competitor plays against every other competitor, and there are no draws.Call a group of four tennis players “ordered” if there is a clear winner and a clear loser (i.e., one personwho beat the other three, and one person who lost to the other three.) Find the smallest integer  n  forwhich any tennis tournament with  n  people has a group of four tennis players that is ordered.

    Answer.   8 .Solution.  First note that a group of four is “ordered” iff it’s transitive iff it’s acyclic (this followsmore generally from the fact that if we contract all maximal directed cycles in a tournament, we geta transitive graph–Prove it!). The answer is 8. For  n  = 7, we can take the tournament described inthe last paragraph here (which also happens to be a counterexample for  k  = 2 here—BTW, check outHroK’s blog if you have not seen it before)—vertices are residues mod 7, and x → {x + 1, x + 2, x + 4}give us the edges. For any vertex  v , its out-neighbors v  + 1, v + 2, v + 4 form a triangle, which meansthere’s no transitive set of four vertices. For   n   = 8 there exists a vertex with at least   8−12   = 3.5

    http://www.artofproblemsolving.com/Forum/viewtopic.php?p=2852395#p2852395http://www.artofproblemsolving.com/Forum/viewtopic.php?f=42&t=492100http://www.artofproblemsolving.com/Forum/blog.php?u=87194http://www.artofproblemsolving.com/Forum/blog.php?u=87194http://www.artofproblemsolving.com/Forum/viewtopic.php?f=42&t=492100http://www.artofproblemsolving.com/Forum/viewtopic.php?p=2852395#p2852395

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    18/28

    January 2013 Winter OMO 2012-2013 Page 15

    out-neighbors and thus some   v   has out-degree at least 4. But every 4-tournament has at least onetransitive set of 3 vertices (else all 3-cycles), so we’re done.

    Comment.  As Andre Arslan notes, the construction for n  = 7 is unique up to isomorphism. You haveto have two disjoint 3-cycles (take any 3-cycle out to leave four vertices, and there must be another

    3-cycle among them). Because the sum of all out-degrees is 21 and nothing has out-degree 4, all out-degrees are 3. Now WLOG pick a vertex in a 3-cycle and two vertices in the other 3-cycle, so thatthe first of the three picked vertices beats the other two, but loses to the vertex in the other 3-cyclenot picked. The edge relationships between the 3-cycles can now be completely determined (it’s prettyeasy to do out, there isn’t really any casework) by looking at different groups of four in the group of six vertices alone. The directions of edges adjacent to the seventh vertex are then easily determined aswell.

    This problem was proposed by Ray Li.

    44. Suppose tetrahedron   PABC  has volume 420 and satisfies  AB   = 13,   BC   = 14, and  CA   = 15. Theminimum possible surface area of  PABC  can be written as  m+n

    √ k, where m, n, k are positive integers

    and k  is not divisible by the square of any prime. Compute  m + n + k.

    Answer.   346 .

    Solution.  Heron’s formula implies [ABC ] = 

    21(21 − 13)(21 − 14)(21 − 15) = 84, whence the vol-ume condition gives

    420 = V (PABC ) = h

    3[ABC ] = 28h   =⇒   h = 15,

    where h  denotes the length of the  P -altitude in tetrahedron  PABC .

    Let Q be the projection of  P  onto plane ABC  and let XY Z  be the pedal triangle of  Q with respect toABC  (so X  is the foot from Q to BC , etc.). Now define x,y, z to be the directed lengths QX,QY,QZ ,respectively, so that x > 0 when Q  and  A  are on the same side of  BC  and x

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    19/28

    January 2013 Winter OMO 2012-2013 Page 16

    Find the remainder when  N  is divided by 1000.

    Answer.   211 .

    Solution.  Throughout this proof, we will use finite differences and Newton interpolation.  (See Lemma

    1 in the first link for a complete proof.)Note that  p = 2011 is prime. We will show more generally that when we replace 4019 by 2 p − 3 and20112 by p2, there are  p2 p−1 such  p-tuples.

    Lemma.   If  p  is a prime, the congruence (−1)k p ≡   (−1) p−12 p−2k+ p − 2 p−2k   (mod p2) holds for  k   =0, 1, . . . , p − 1.

    Proof.   Expand.

    Corollary.   The 2 p − 2th finite differences of the  p-periodic sequence  b  = (b0, b1, b2, . . .) all vanish if and only if  p | b1 + b2 + · · · + b p.

    Proof.  By the lemma,

    ∆2 p−2[b]j  =2 p−2i=0

    (−1)i

    2 p − 2i

    bj+i ≡ − p

     p−1i=0

    bj+i   (mod  p2)

    for fixed  j ≥ 0.

    Extend the indices of the  ai   modulo   p   so that  ai   =  ai   (mod  p)   for all integers   i. Since  f (x) satisfiesthe three properties if and only if  f (x) +  p2x2 p−3 does, we just have to find the number of  p-tuplesinterpolated by a polynomial of degree  at most  2 p − 3. By Newton interpolation, this is possible if andonly if the 2 p − 2th finite differences of the infinite (periodic) sequence  a  = (a0, a1, a2, . . .) all vanishmodulo  p2. By the Lemma, this occurs when and only when  p | a1 + a2 + · · · + a p, so the answer is

    1

     p

    ( p2) p = p2 p−1 = 20114021

    ≡1121

    ≡1 +

    21

    110 +

    21

    210

    2

    ≡211 (mod 1000).

    Solution 2.  A more conceptual solution can be found by relating (x−1)d+1(a0 +a1x+ · · ·+a p−1x p−1)modulo  p2, x p − 1 to the “interpolating polynomials” of the  p-tuple (a1, a2, . . . , a p). If (x − 1)2 p−2 ≡m(1 + x + · · · + x p−1) in this modulus, it’s not hard to prove  v p(m) = 1.The idea is that 4020 is the smallest integer such that (x − 1)4020+1 vanishes mod 20112, x2011 − 1,so you note that the interpolating polynomials of degree 4020 for (1 , 0, . . . , 0), (0, 1, . . . , 0), etc., sayG1, G2, . . . , G p   (2011 places for the 1, all else 0) all have the same “Newton interpolation leadingcoefficient” (i.e. the coefficient of 

      x

    4020

    , or the 4020th finite difference), with 2011-adic valuation

    exactly 1. Indeed, for ( p, 0, . . . , 0), the least interpolating degree is lower than the maximum of 4020(by induction, considering the mod  p, x p−1 problem instead of mod p2, x p−1), so this gives us  v p  = 1,and of course, the 4020th finite differences of  Gi  all have to be equal since 4021th vanish always. Sowe have degree 4020 exactly when 2011   a1 +

    · · ·+ a2011, so the answer is (1

    −1/p)( p2) p.

    Comment.  See this thread and its resolution on MathOverflow for the original context of this problem.

    The author conjectures that j

    k=0(−1)kpi pi+(j−1)φ( pi)−1

    kpi

     ≡   (− p)j−1 (mod  pj), which for   j   = 2 isstronger than the v p  = 1 condition mentioned in the second solution (it gives the exact value mod  p

    2).For higher j  the reader can check this is stronger than the corresponding  v p  =  j − 1.This problem was proposed by Victor Wang.

    http://en.wikipedia.org/wiki/Finite_differencehttp://www.artofproblemsolving.com/blog/10580http://www.artofproblemsolving.com/blog/10584http://www.artofproblemsolving.com/Forum/viewtopic.php?f=57&t=489734http://mathoverflow.net/questions/102257/polynomial-representation-of-sequences-of-length-n-taken-modulo-mhttp://mathoverflow.net/questions/102257/polynomial-representation-of-sequences-of-length-n-taken-modulo-mhttp://www.artofproblemsolving.com/Forum/viewtopic.php?f=57&t=489734http://www.artofproblemsolving.com/blog/10584http://www.artofproblemsolving.com/blog/10580http://en.wikipedia.org/wiki/Finite_difference

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    20/28

    January 2013 Winter OMO 2012-2013 Page 17

    46. Let  ABC   be a triangle with  ∠B − ∠C  = 30◦. Let  D  be the point where the  A-excircle touches lineBC ,  O   the circumcenter of triangle  ABC , and  X, Y   the intersections of the altitude from A  with theincircle with X  in between A  and  Y . Suppose points A, O  and  D  are collinear. If the ratio   AOAX   can be

    expressed in the form   a+b√ c

    d   for positive integers a,b,c,d  with gcd(a,b,d) = 1 and  c  not divisible by

    the square of any prime, find  a + b + c + d.Answer.   11 .

    Solution.  The angle condition is equivalent to ∠ADB  = 60◦. Let H  be the orthocenter, I  the incenter,and  E  the tangency point of  BC  and the incircle (I ); reflect  E   over  E    to get  I . By the well-knownhomothety about A  taking (I ) to the A-excircle, we see that A, E , D are collinear. Thus  AE OD  is theA-isogonal of  AXHY , so AE  =  AE . Since E IE  ⊥ BC  ⊥ AXHY   and  ∠DAH  = 30◦,  ∠AE I  = 150◦and since  IX   =  I E , AXI  ∼= AE I , whence  ∠AXI  = 150◦   and thus  AXIE    is a rhombus. Nownote that  OE  =  OD, so O  is the midpoint of  E D  in right triangle E ED. But I  is the midpoint of E E , so  ∠OI E  = 90◦  and it follows that

    AO

    AX   =

      AO

    AE   = 1 +

     OE 

    IE   = 1 +

      1

    sin60◦  =

     3 + 2√ 

    3

    3  .

    Solution 2.   Let   AD   meet the incircle   ω   at   X , and recall that   X I   is a diameter of   ω. Let theinradius be r  and the circumradius  R. Note that since  ∠BAY   = ∠DAC  = 90 − B, we can derive that∠XAX  = 30◦  and AX  = AX .

    Then, note also that  O  is the midpoint of  X D. Using the angle information, we find that I O  =   r√ 3

    .

    Observe  OA =  OB  =  R.

    Assume WLOG that   r   =√ 

    3. Now, set   I   = (−1, 0),   O   = (0, 0),   A   =−R2 ,

    √ 3R2

      and   B   =−√ R2 − 3, −√ 3. We need  AB  to be tangent to ω ; that is, the distance from  I   to AB   is  r  = √ 3. A

    few pages of calculation yield the quartic  R4 − 11R2 − 12R + 4 = 0, which has a double root at −2and gives (R + 2)2(R2 − 4R + 1) = 0, which gives  R  = √ 3 + 2 as the only valid solution.Then,   AOAX   =

      RR−   2√ 

    3r

     =   2+√ 

    3√ 3

      =   2√ 

    3+33   .

    Solution 3.  (Sketch) It’s possible to find a trigonometric solution with only the synthetic observation

    AE   =   AE . Indeed, we can use the homothety relation   AE 

    AD   =  rra

    =   s−as   and the law of sines onADC  to get everything in terms of trigonometric functions involving  C . Using the sine and cosineaddition and subtraction formulas a few times, we can get an equation in terms of cos 2x  and cos x,where x  =  C  + 15◦ = 90◦ −  A2 .This problem was proposed by James Tao. The second solution was provided by Evan Chen. Thethird solution was provided by Victor Wang.

    47. Let f (x, y) be a function from ordered pairs of positive integers to real numbers such that

    f (1, x) =  f (x, 1) =  1

    x  and   f (x + 1, y + 1)f (x, y) − f (x, y + 1)f (x + 1, y) = 1

    for all ordered pairs of positive integers (x, y). If   f (100, 100) =   mn   for two relatively prime positiveintegers  m, n, compute  m + n.

    Answer.   111088900001 .

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    21/28

    January 2013 Winter OMO 2012-2013 Page 18

    Solution.  We can easily prove by induction that

    f (x, y) = 1 + 4

    x+1

    3

    y+1

    3

    xy

    for all positive integers  x, y. It quickly follows that  f (100, 100) =   1+111100·99990010000   .

    Comment.  Perhaps the most natural way to find the pattern is to find  f  for small fixed values of  y(say 0 through 3). When searching for the pattern, it is helpful to substitute  g(x, y) =  xyf (x, y).

    This problem was proposed by David Yang.

    48.   ω  is a complex number such that  ω2013 = 1 and  ωm = 1 for  m = 1, 2, . . . , 2012. Find the number of ordered pairs of integers (a, b) with 1 ≤ a, b ≤ 2013 such that

    (1 + ω + · · · + ωa)(1 + ω + · · · + ωb)3

    is the root of some polynomial with integer coefficients and leading coefficient 1. (Such complex

    numbers are called  algebraic integers .)

    Answer.   4029 .

    Solution.  We will repeatedly use the fact that the set AI  of algebraic integers is closed under additionand multiplication (in other words,  AI   is a   ring ). First, however, we show that

    (1 + ω + · · · + ωa)(1 + ω + · · · + ωb)3

    must in fact be an algebraic integer for  every  primitive 2013th root (if it is for at least one)1.   Actually,we can prove a much more general statement.

    Lemma 1.   Let z  be an algebraic number with minimal polynomial  f  ∈ Q[x] of degree n ≥ 1 (so thatf   is monic). Suppose f   has roots  z1  =  z , z2, . . . , zn  (these are the  conjugates   of  z). If there exists apolynomial  g ∈ Q[x] for which g (z) ∈ AI , then g (zi) ∈ AI   for i  = 1, 2, . . . , n.

    Proof.   Let h ∈ Q[x] be the minimal polynomial of  g(z); then h  (which is monic) has integer coefficientssince g(z) ∈ AI . Since  h(g(x)) has rational coefficients and h(g(z)) = 0, the minimal polynomial  f (x)of  z   must divide  h(g(x)). But then h(g(zi)) = 0 for all   i  (the  zi  are the roots of  f  by definition), sog(zi) ∈ AI  for all  i  (the roots of  h(x) are all algebraic integers by definition).For a slightly different (but really equivalent) perspective, consider the map  f i   :  Q(z) →  Q(zi) thatfixes the rationals, is multiplicative and additive, and maps   z   to   zi; then   f i   is a  ring isomorphism(because  z   and  zi  have the same minimal polynomial). In particular, since  f i  fixes the coefficients of g  and h, we have

    0 =  f i(0) = f i(h(g(z))) = h(g(f i(z))) = h(g(zi)) = 0,

    whence zi  is also a root of  h(g(x)).See the second post here for a more “concrete” application of these ideas.

    Lemma 2.   The  nth cyclotomic polynomial Φn(x) evaluated at 1 gives 0 for  n  = 1,  p   for  n  =  pk a

    prime power, and 1 otherwise.

    1For contest purposes, this can actually just be deduced by meta-analysis of the problem statement.

    http://en.wikipedia.org/wiki/Algebraic_integer#Factshttp://en.wikipedia.org/wiki/Algebraic_integer#Factshttp://en.wikipedia.org/wiki/Algebraic_integer#Factshttp://en.wikipedia.org/wiki/Algebraic_integer#Factshttp://en.wikipedia.org/wiki/Algebraic_numberhttp://www.artofproblemsolving.com/blog/10567http://en.wikipedia.org/wiki/Ring_homomorphism#Propertieshttp://www.aops.com/Forum/viewtopic.php?f=36&t=471877http://www.aops.com/Forum/viewtopic.php?f=36&t=471877http://en.wikipedia.org/wiki/Ring_homomorphism#Propertieshttp://www.artofproblemsolving.com/blog/10567http://en.wikipedia.org/wiki/Algebraic_numberhttp://en.wikipedia.org/wiki/Algebraic_integer#Factshttp://en.wikipedia.org/wiki/Algebraic_integer#Facts

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    22/28

    January 2013 Winter OMO 2012-2013 Page 19

    Proof.   From 

    d|n Φd(x) =   xn − 1, we get 1 1, Φn(1) = 0 since 1 is nota primitive nth root of unity.)

    Corollary.   If  n  has at least two distinct prime factors, 1

    −ζ  is an “invertible” algebraic integer for

    any primitive  nth root of unity  ζ .

    Proof.   First suppose n  has at least two distinct prime factors. Clearly 1 − ζ  is an algebraic integer. Onthe other hand, Lemma 2 gives us Φn(x) = (x − 1)f (x) + 1 for some polynomial f  ∈ Z[x], so pluggingin x  =  ζ  gives (1 − ζ )−1 = f (ζ ), which is indeed an algebraic integer (as  f  has integer coefficients).

    The corollary tells us that for a fixed 2013th primitive root of unity  ω ,

    (1 + ω + · · · + ωa)(1 + ω + · · · + ωb)3

      ∈ AI 

    if and only if   (1−ωa+1)(1−ωb+1)

    3   ∈ AI  is too. From now on we work with this simpler form.If 2013

     |  a + 1 or 2013

     |  b + 1, the expression vanishes and is trivially an algebraic integer, so now

    suppose 2013   a + 1 and 2013   b + 1. Multiplying the new expression over all 2013th primitive rootsof unity shows that

    3−φ(2013)

    0

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    23/28

    January 2013 Winter OMO 2012-2013 Page 20

    Answer.   68737600 .

    Solution.   Let a  =  BC ,  b  =  C A,  c  =  AB, and compute  c = 3640√ 

    2. Let  M   be the midpoint of  AC and let  O  be the circumcenter of  ABC .It is well known that  KMLM    is cyclic, as is  AMOM . Also,  ∠BO A  = 2∠C   = 90◦, so  O   lies onthe circle with diameter  AB. Then N   is the radical center of these three circles; hence  A,N, O   arecollinear.

    Now applying Brokard’s Theorem to the circle with diameter  AB, we find that  M  is the orthocenterof the  OP H , where  H    =  LA ∩ BO . Hence  H    is the orthocenter of  MOP , whence  H   =  H    =AC ∩ BO.Then, it is well known2 that

    AH 

    HC   =

      c2(a2 + b2 − c2)a2(b2 + c2 − a2)

    where the lengths are directed. Cancelling a factor of 280 2 we can compute:

    AH HC 

      =   c2

    (a2

    + b2

    − c2

    )a2(b2 + c2 − a2)

    = 338(576 + 98 − 338)576(98 + 338 − 576)

    = −169120

    .

    Therefore,

    AC 

    HC   = 1 +

     AH 

    HC 

    = −  49120

    =⇒ |HC | = 12049

      · 1960√ 2= 4800

    √ 2.

    Now applying the Law of Cosines to KC H  with  ∠KC H  = 135◦  yields

    HK 2 = KC 2 + CH 2 − 2KC  · CH  · cos 135◦

    = 19602 +

    4800√ 

    22

    − 2(1960)

    4800√ 

    2

    −   1√ 2

    = 402

    492 + 2 · 1202 + 2 · 49 · 120= 1600 · 42961= 68737600 .

    Solution 2.  We use the following more general formulation:

    2One can prove this just using the identity   BP PC 

      =   b sin∠PABc sin∠CAP 

     and substituting the law of cosines in.

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    24/28

    January 2013 Winter OMO 2012-2013 Page 21

    Work in the projective plane for convenience and consider any triangle  AB C . Let  K, L  bethe feet of the altitudes from  A, B   respectively, and let  T   =  AK  ∩ BL  be the orthocenterof  ABC . Let  P  be the intersection of line  B LT  and the tangent  AA  to (AT B) (this linecontains N   in the original problem, so the definition of  P  is still the same regardless of angleC ), and let  O  be the point on line  AB  satisfying  LO

     ⊥ BC  (the new definition of  O  is the

    key change). If  M  is the midpoint of  AB , compute  H K 2.

    Let Q  =  LO ∩ BC  be the foot from  L  to  B C . We want to relate  P   to O, M   somehow; define  S  to bethe intersection of lines  P A(N ) and  LOQ. Since lines  LOQS,TAK  are parallel and  P A  is tangent to(AT B),

    LSA  = T AP  = T BA  = LBA,

    so   L,A,K,S,B   all lie on the circle   ω  with diameter   AB. By Brokard’s theorem,   P   =   AS  ∩ BL,O  = AB ∩ LS ,  X  =  AL ∩ BS  form a self-polar triangle, so  M , the center of  ω, is the orthocenter of XOP . But then  X  must be the orthocenter of  M OP , so in fact  X  = H . Now proceed as above.For a directed-friendly finish, use the law of sines on HBC  to get  H B  and H C  in terms of  B C   and∠BH C , and then use the directed version of Stewart’s theorem to get  H K .

    This problem was proposed by Evan Chen. The second solution was provided by Victor Wang.

    50. Let   S  denote the set of words   W   =   w1w2 . . . wn   of any length   n ≥   0 (including the empty stringλ), with each letter  wi   from the set {x,y,z}. Call two words  U, V   similar   if we can insert a strings ∈ {xyz,yzx,zxy} of three consecutive letters somewhere in U  (possibly at one of the ends) to obtainV   or somewhere in  V   (again, possibly at one of the ends) to obtain  U , and say a word  W   is   trivial if for some nonnegative integer  m, there exists a sequence  W 0, W 1, . . . , W  m   such that  W 0   =  λ  is theempty string,  W m =  W , and W i, W i+1  are similar for  i  = 0, 1, . . . , m − 1. Given that for two relativelyprime positive integers  p, q  we have

     p

    q   =n≥0

    f (n)

     225

    8192

    n,

    where f (n) denotes the number of trivial words in  S  of length 3n (in particular,  f (0) = 1), find  p + q .

    Answer.   61 .

    Solution.   First we make some helpful definitions.

    For convenience, call  xyz,yzx,zxy   the three   cyclic words . Let  λ  be the empty string. Say the wordW   is  reduced  unless and only unless at least one of the three cyclic words appears as a string of threeconsecutive letters in  W . (In particular,  λ  is reduced.) Let  S ∗ ⊆ S  be the set of reduced words.Define ∼   so that   U  ∼   V   if and only if   U, V   are similar. Call two words   U, V    equivalent   if thereexists a finite sequence of words  W 0, W 1, . . . , W  m   such that  U   =  W 0,   V   =  W m, and  W i ∼  W i+1   fori = 0, 1, . . . , m−1. Define the binary relation ≡ so that U  ≡ V  if and only if  U, V   are equivalent. Then≡  is clearly reflexive, symmetric, and transitive, and  W   is trivial if and only if  W  ≡ λ. Furthermore,if  A ≡ C  and B ≡ D, then AB ≡ CD .

    The distinction between = and ≡ will be important throughout the proof. We have  U  = V  if and onlyif  U, V  are identical when parsed as   sequences of letters , i.e. they’re composed of the same letters inthe same order (and in particular, have the same length).

    Let   T  be the set of trivial words and  T 0 ⊆  T   be the set of   minimal   trivial words, i.e. words   W   =w1w2 . . . wn ∈  T   such that  w1w2 . . . wi   /∈  T   for   i  = 1, 2, . . . , n − 1 (we vacuously have  λ ∈  T 0). It’seasy to see that every trivial word  W   can be uniquely expressed in the form  W 1W 2 . . . W  m   for somenonnegative integer  m  and nonempty  W 1, W 2, . . . , W  m ∈  T 0. (*) Indeed, this follows from the simplefact that  B ≡ λ if  AB, A ∈ T .

    http://en.wikipedia.org/wiki/Empty_stringhttp://en.wikipedia.org/wiki/Binary_relation#Relations_over_a_sethttp://en.wikipedia.org/wiki/Binary_relation#Relations_over_a_sethttp://en.wikipedia.org/wiki/Empty_string

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    25/28

    January 2013 Winter OMO 2012-2013 Page 22

    Lemma 1.  No two distinct reduced words are equivalent.

    Proof.  Define a “canonical” reduced form  R(W ) for each word  W  ∈ S  by always deleting the leftmostcyclic word in  W  until it’s no longer possible (so  zxyxyzz  becomes xyzz  and then  z ).

    We will now show that R(A) =  R(B) whenever A ∼ B. WLOG suppose that A =  P Q and B  =  P xyzQfor two words  P, Q   (possibly empty). Since R(A) =  R(R(P )Q) and  R(B) =  R(R(P )xyzQ), we canWLOG suppose that   P  ∈   S ∗. If   xyz   is the leftmost cyclic word in  B, then   R(PxyzQ) =   R(P Q).Otherwise,  P   ends in  z. If  P   = P yz  for some  P  ∈  S   (since  P  ∈  S ∗,  P   doesn’t end in  x), then  yzxis the leftmost cyclic word in  B   and  R(PxyzQ) =  R(P (yzx)yzQ) =  R(P yzQ) =  R(P Q). Finally,if  P   =  P z   for some  P  ∈  S   but  P    doesn’t end in  y, then  zxy   is the leftmost cyclic word in  B   andR(PxyzQ) =  R(P (zxy)zQ) =  R(P zQ) =  R(P Q), completing the proof that  R(A) =  R(B).

    We can directly extend this to find that   R(A) =  R(B) whenever   A ≡   B. But then  R(A) =   R(B)implies A ≡ B   for any two distinct reduced words  A, B.

    Comment.  This is loosely modeled off of the proof in Lemma 1 here that the free group is nontrivial.

    Corollary.   R(W ) is the unique reduced word  W ∗ ∈ S ∗  equivalent to  W . In particular,  W  is trivial if and only if  R(W ) =  λ  (so 3 | |W |  for all  W  ∈ T ).

    Proof.  If not, then there are two distinct reduced words equivalent to  W , contradicting the lemma.

    We are now prepared to prove the key lemma. Define the function   t   : {x,y,z} → {x,y,z}   so thatt(x) =  y,  t(y) =  z,  t(z) =  x.

    Lemma 2.   Let n  be a positive integer. Then the word  W   = w1w2 . . . wn  lies in  T 0  if and only if thereexists a sequence of nonempty words  A1, A2, . . . , Am ∈  T 0   (m ≥  0) and index  p ∈ {0, 1, . . . , m}   suchthat

    W  = w1A1A2 . . . A pt(w1)A p+1A p+2 . . . Amt2(w1),

    none of  A1, A2, . . . , A p  end with  w1, and none of  A p+1, A p+2, . . . , Am  start with  t2(w1). Furthermore,

    this representation is unique for any fixed  W  ∈ T 0.

    Proof.   Call the representation a  standard presentation of  W  if it exists.

    We proceed by strong induction on  n ≥ 1. For the base case, note that by the Corollary (to Lemma1)3, the only nonempty trivial words of length at most three are the three cyclic words, which are alsominimal. This proves the claim for  n ≤ 3.Now suppose  n ≥  4 and assume the inductive hypothesis for 1, 2, . . . , n − 1. We will first show thatevery minimal trivial word  W   has a standard presentation. Of course, the Corollary implies 3 |  n.By the minimality of  W  and the Corollary (consider the possible sequences of reductions taking  W   toR(W ) =  λ), there exists an index q  ∈ {1, 2, . . . , n}  such that

    w1wqwn

     ≡w2w3 . . . wq

    −1

     ≡wq+1wq+2 . . . wn

    −1

     ≡λ.

    (Why?) Then wq   =   t(w1),   wn   =   t2(w1), and by (*), there exists a (unique) sequence of nonempty

    words   A1, A2, . . . , Am ∈   T 0   (m ≥   0) and index   p ∈   [0, m] such that   w2 . . . wq−1   =   A1 . . . A p   andwq+1 . . . wn−1  =  A p+1 . . . Am. If for some  i ∈ [ p + 1, m],  Ai  ends with  t2(w1), then

    w1A1 . . . A pt(w1)A p+1 . . . Ai−1t2(w1) ≡ λ,3Lemma 1, while only explicitly used once, is the cornerstone of the base case, without which the induction would crumble.

    In particular, it shows that  xzy, yxz, zyx /∈ T .

    http://buzzard.ups.edu/courses/2012spring/projects/wonderly-combinatorial-ups-434-2012.pdfhttp://en.wikipedia.org/wiki/Free_group#Constructionhttp://en.wikipedia.org/wiki/Free_group#Constructionhttp://buzzard.ups.edu/courses/2012spring/projects/wonderly-combinatorial-ups-434-2012.pdf

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    26/28

    January 2013 Winter OMO 2012-2013 Page 23

    contradicting the minimality of  W . Similarly, if  Ai   ends with  w1  for some i ∈ [1, p], thenw1Ai+1 . . . A pt(w1)A p+1 . . . Amt

    2(w1) ≡ λ,once again contradicting the minimality of  W  (this time, however, we use the fact that  W   is minimal

    if and only if  wi . . . wn ≡ λ for  i ∈ [1, n], which follows, for instance, from (*)).The previous paragraph establishes the existence of a standard presentation for W  ∈ T 0. Now assumefor contradiction that there exists another such representation

    w1A1A

    2 . . . A

     pt(w1)A

     p+1A

     p+2 . . . A

    mt

    2(w1),

    with the t(w1) in the middle indexed at wq  (the t2(w1) at the end is, of course, wn). By (*),  q 

     cannotequal   q , so WLOG   q    > q . We must then have Ai  =  Ai   for   i  = 1, 2, . . . , p, whence  A

     p+1  starts with

    t(w1) and by the inductive hypothesis, ends with   t2(t(w1)) =  w1. Yet this contradicts the validity of A p+1, so the standard presentation of  W  must in fact be unique.

    Finally, we show that if  W   has a standard presentation, then it must lie in T 0. Since w1t(w1)t2(w1) ≡

    Ai ≡   λ   for   i   = 1, 2, . . . , m,   W   is obviously trivial; it remains to show that   W   is minimal. Go bycontradiction and suppose there exists  n

     ∈[1, n) such that  W   =  w1w2 . . . wn

     ∈T 0; by the inductive

    hypothesis, W   has a (unique) standard presentation

    w1A1A

    2 . . . A

     pt(w1)A

     p+1A

     p+2 . . . A

    mt

    2(w1).

    As in the previous paragraph, if  q  denotes the index of  t(w1) in  W , then we must have q  =  q  (otherwiseone of  A1, . . . , A

     p , A1, . . . , A p  starts with t(w1) and so ends with  w1). Therefore m

     < m and  Ai =  Aifor i ∈ [ p + 1 = p + 1, m], whence  t2(w1) will appear at the start of  Am+1, contradiction.

    In view of Lemma 2, let   g(n) be the number of minimal trivial words of length 3n   (n >   0). Theng(1) = 3 and considering standard presentations, we get

    g(n)

    3  =

    a1+

    ···+am=n

    −1

    m,a1,...,am≥1

    (m + 1)mi=1

    2

    3g(ai)

    for4 n ≥  2 (in the notation of Lemma 2, there are  m + 1 choices for  p, and   23 g(|Ai|) choices for eachAi, regardless of whether i ≤  p  or  i ≥  p + 1). Summing over n ≥ 2 yields

    G(u)

    3  =

     g(1)u

    3  + u

    m≥1

    (m + 1)

    2

    3G(u)

    m

    = um≥0

    (m + 1)

    2

    3G(u)

    m

    =  u

    (1 − 2G(u)/3)2 ,

    where G(u) = n≥1

    g(n)un. By (*),  F (u) = n≥0

    f (n)un =   11−G(u)

    .

    Before evaluating the generating functions  F, G at  u  = 225/8192, observe that 0 ≤ g(n) ≤ f (n) ≤ 33nfor every nonnegative integer  n, so

    0 < G(225/8192) ≤ F (225/8192) ≤n≥0

    33

     225

    8192

    n

    4Actually, the recurrence is true for  n  = 1 “by convention,” i.e. if we allow  m  = 0 and interpret empty products as 1. Thissimplifies the calculation of  G(u) slightly.

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    27/28

    January 2013 Winter OMO 2012-2013 Page 24

    converges (as 33·225 = 6075 <  8192). Thus G(u), F (u) are positive reals satisfying G(u) = 1−F (u)−1 <1.

    Finally, letting  v  =  G(u)/3, we get

    15

    2

    213   =   2258192 = v(1 − 2v)2 =⇒   152 = w(16 − w)2,

    where w  = 25v. Solving this cubic yields  w ∈ {1,  12 (31 ±√ 

    61)}. But   332 w =  G(u) <  1 =⇒   w <   323   <11 <   12 (31 ±

    √ 61), forcing  w  = 1 =⇒   G(u) =   332 . Therefore F (u) =   11−G(u)  =   11−3/32  =   3229 .

    Solution 2.  Map every word by adding the position of the word to itself mod 3, so we can considerinserting/deleting xxx,  yyy, or z zz  instead.

    Now consider each word as a sequence of instructions acting on a stack, where  x  is an instruction thatsays “if the top two elements of the stack are both  x, pop both of them; otherwise push  x”. We claimthe set of trivial words is the set of programs that, when run on an empty stack, result in anotherempty stack.

    The three sequences   xxx,   yyy ,   zzz   are always no-ops (they just cycle the number of some elementdirectly on top of the stack mod 3), so clearly inserting or deleting them will preserve the effects of aprogram. Furthermore, any effectless program can be obtained by insertions alone: just look at the 2operations before and 1 after any moment when the stack has the most elements, and induct on length.

    Then we can note three important parts in each trivial nonempty program  P : (I) after the first symbol,say w  is pushed; (II) after the second copy of that symbol  w  is pushed; (III) after ww  is popped.

    The part after (III) can be any other trivial program. The parts between (I) and (II), and between(II) and (III), must each be trivial programs where  w  is never pushed as the bottom of the stack. Let’scall these “w-bottomless” programs (all the good names have been taken :( ).

    w-bottomless programs can be divided into three parts in the same way. Then we discover the necessaryparts in each part are also something-bottomless programs. That is, you can get an   x-bottomlessprogram, say, by picking which of  y   or  z  to push (WLOG  y), which  y-bottomless program to put in

    part (I), which  y-bottomless program to put in part (II), and which  x-bottomless program to put inpart (III). So there’s a simple generating function equation:

    B(x) = 1 + 2xB(x)3.

    You can actually count the number of   w-bottomless programs directly. Factor out the power of 2that results from each choice of symbol, so the difference sequence of the stack heights/sizes is asequence of +1s and −2s that sum to 0 with no negative partial sums. Then insert a +1 at the startto convert the condition to “no  nonnegative  partial sums”, cyclically permute the steps, and observethat exactly one cyclic permutation of these steps has no nonnegative partial sums, so we get a totalof 2n   13n+1

    3n+1n

    =   2

    n

    n

    3nn−1

     where  n  is the number of  −2s, or equivalently, 3n  is the number of stepsin the  w-bottomless program. To recover the stack sequence/bottomless program from the sequenceof +1s and −2s, consider the first −2, which must have two +1s before it, and remove these threenumbers. These three correspond to a “pop”, and because they have zero sum, we can repeatedlytake out +1, +1, −2 subsequences, each corresponding to a “layer” in the program. Order the layers asfollow: the layer corresponding to the first +1 is the “first”; after that, the first +1 we encounter thatis not in the first layer and its two partners belong to the “second layer”, and so on. For convenience,define a “phantom zeroth layer” www. Then when we evaluate the program (including pops, etc.), thefirst +1 of the ith layer, i > 0 will be directly “above” a +1 (either the first or second) of the  j th layerfor some 0 ≤  j < i, and thus must have a different symbol. (For   j  = 0, it just means we’ve reachedthe bottom again, so the ith layer can’t have symbol w  by the w-bottomless restriction). In particular,

  • 8/20/2019 Omo Winter 13 So Lnsbbbb

    28/28

    January 2013 Winter OMO 2012-2013 Page 25

    the first layer cannot start with  w.) Thus we have 2n ways to assign symbols to the sequence of +1sand −2s, one power of 2 for each layer.Then for the original sequence’s generating function, again: there are 3 ways to choose which symbolis first pushed, and you have to choose two something-bottomless programs for (I) and (II) and one

    trivial program for (III), so: F (x) = 1 + 3xB(x)2F (x)

    Then just plug in x  and solve the two equations for  B(x) and F (x). (Presumably there are extraneoussolutions, but I just assumed the one that looked nice was right. :P)

    Comment.  The key here is to recognize that this is sort of similar to Catalan parentheses recurrence(with the notion of minimal words). In fact if we replace {xyz,yzx,zxy} with {xy}, then the problemis equivalent to Catalan. However, the primary motivation for this problem is the one posted here,with x + y + y−1x−1 instead of  x + y + x−1 + y−1. Also, it is possible to get a nice closed form for  g(n)using the Lagrange inversion theorem:  we can get

    g(n) = 3 · 2n−1

    3n − 1 3n − 1

    n,

    which checks out with the computations above using  WolframAlpha.

    However, in order to generalize this to four or more letters in the natural way (so {xyzw,yzwx,...} forfour letters), we need to slightly modify Lemma 2. The key ideas are the same, however, so we leavethe rest to the interested reader. (It may be helpful to use the fact that if  U V  ≡  λ, then  V U  ≡  λ.Basic group theory, particularly the notion of   inverses, may make this slightly easier to see.)

    This problem was proposed by Victor Wang. The second solution was given by Brian Chen, with aclose variant posted by Team SA on AoPS.

    http://www.aops.com/Forum/viewtopic.php?f=588&t=290369http://en.wikipedia.org/wiki/Lagrange_inversion_theorem#Theorem_statementhttp://www.wolframalpha.com/input/?i=sum%28%28225%2F8192%29%5En+Binom%5B3n-1%2Cn%5D%283*2%5E%28n-1%29%29%2F%283n-1%29%2C+n%3D1+to+infty%29http://en.wikipedia.org/wiki/Group_(mathematics)#Definitionhttp://www.artofproblemsolving.com/Forum/viewtopic.php?p=2906407#p2906407http://www.artofproblemsolving.com/Forum/viewtopic.php?p=2906407#p2906407http://en.wikipedia.org/wiki/Group_(mathematics)#Definitionhttp://www.wolframalpha.com/input/?i=sum%28%28225%2F8192%29%5En+Binom%5B3n-1%2Cn%5D%283*2%5E%28n-1%29%29%2F%283n-1%29%2C+n%3D1+to+infty%29http://en.wikipedia.org/wiki/Lagrange_inversion_theorem#Theorem_statementhttp://www.aops.com/Forum/viewtopic.php?f=588&t=290369