CEMC Banner

2016 Euclid Contest
Solutions

Tuesday, April 12, 2016
(in North America and South America)

Wednesday, April 13, 2016
(outside of North American and South America)

©2016 University of Waterloo


    1. The average is 5+15+25+35+45+556=(5+55)+(15+45)+(25+35)6=60+60+606=30

    2. Since x2=2016, then (x+2)(x2)=x24=20164=2012.

    3. Since points P, Q and R lie on a straight line, then the slope of PQ equals the slope of PR.

      The slope of PQ equals 2a5a7 and the slope of PR equals 305127=255=5.

      Therefore, 2a5a7=5 and so 2a5=5(a7).

      This gives 2a5=5a35 or 3a=30, and so a=10.

    1. If n9=25n, then n2=25(9)=225. Therefore, n=15 or n=15.

      (We can check by substitution that each of these values satisfies the original equation.)

    2. When we expand the left side of (x3)(x2)=6, we obtain x25x+6=6.

      Thus, x25x=0 or x(x5)=0, which gives x=0 or x=5.

      (We can check by substitution that each of these values satisfies the original equation.)

    3. Let a be the cost, in dollars, of 1 apple and let b be the cost, in dollars, of 1 banana.

      From the given information, 2a=3b and 6a+12b=6.30.

      Since 3b=2a, then 12b=4(3b)=4(2a)=8a.

      Therefore, 6a+8a=6.3 or 14a=6.3, which gives a=0.45.

      In other words, the cost of 1 apple is $0.45.

    1. Solution 1

      Since the sum of the angles in any triangle is 180, then the combined sum of the angles in ABD, FBG and CBE is 3180 or 540.

      The nine angles in these triangles include those with measures, in degrees, of p,q,r,s,t,u as well as the three angles ABD, FBG and CBE.

      These last three angles form a straight angle, and so their sum is 180.

      Therefore, the sum of the remaining six angles must be 540180=360.

      In other words, p+q+r+s+t+u=360.

      Solution 2

      We repeatedly use the fact that the sum of the angles in any triangle is 180.

      From ABD, ABD=180pq.

      From FBG, FBG=180rs.

      From CBE, CBE=180tu.

      Since ABC forms a straight line segment, then ABD+FBG+CBE=180 which gives (180pq)+(180rs)+(180tu)=180 Rearranging, we obtain 360=p+q+r+s+t+u and so the value of p+q+r+s+t+u is 360.

    2. Solution 1

      The integer equal to 1020 consists of the digit 1 followed by 20 0s.

      The integer equal to 10201 thus consists of 20 9s.

      Now, n=102020 is 19 less than 10201 which is the integer that consists of 20 9s.

      So n=102020=99980 where this integer has 18 9s.

      Therefore, the sum of the digits of n is 18(9)+8+0=162+8=170.

      Solution 2

      Since 102020=10(10192) and 10192=9998 (where this integer has 18 9s), then 102020=99980, where this integer has 18 9s.

      Therefore, the sum of the digits of n is 18(9)+8+0=162+8=170.

    3. Solution 1

      Since P(2,0) and Q(8,0), then PQ=82=6.

      Let h be the perpendicular distance from V to PQ.

      Then the area of VPQ equals 12(PQ)h.

      Since the area of VPQ is 12, then 12(PQ)h=12 and so 12(6)h=12 or h=4.

      Since V is below the x-axis, then the y-coordinate of V is 4.

      Since V is the vertex of a parabola and P and Q are points where the parabola intersects the x-axis, then the x-coordinate of V is the average of the x-coordinates of P and Q, which is 12(2+8)=5.

      Finally, the coordinates of V are (5,4).

      Solution 2

      Since the parabola intersects the x-axis at P(2,0) and Q(8,0), then the equation of the parabola will be of the form y=a(x2)(x8) for some a0.

      Completing the square, we obtain y=a(x210x+16)=a((x5)29)=a(x5)29a From this, we see that the vertex of this parabola has coordinates (5,9a).

      Since the vertex of the parabola is below the x-axis, then 9a<0 or a>0.

      Now VPQ has base PQ along the x-axis (which has length 82=6).

      The corresponding height is the perpendicular distance from V to the x-axis. This equals 9a, since a>0.

      Since the area of VPQ is 12, then 12(6)(9a)=12 or 27a=12 which gives a=49.

      Finally, substituting a=49 into (5,9a) gives the conclusion that the coordinates of V are (5,4).

    1. Rewriting sin2θ+2cos2θ=74, we get (sin2θ+cos2θ)+cos2θ=74.

      Since sin2θ+cos2θ=1 for any angle θ, then 1+cos2θ=74 and so cos2θ=34 or cosθ=±32.

      Since 0θ180, then cosθ=32 exactly when θ=30.

      Since 0θ180, then cosθ=32 exactly when θ=150.

      Therefore, θ=30 or θ=150.

      (We can check by substitution that each of these values satisfies the original equation.)

    2. Let the radius of the smaller circle be r cm and let the radius of the larger circle be R cm.

      Thus, the circumference of the smaller circle is 2πr cm, the circumference of the larger circle is 2πR cm, the area of the smaller circle is πr2 cm2, and the area of the larger circle is πR2 cm2.

      Since the sum of the radii of the two circles is 10 cm, then r+R=10.

      Since the circumference of the larger circle is 3 cm larger than the circumference of the smaller circle, then 2πR2πr=3, or 2π(Rr)=3.

      Then the difference, in cm2, between the area of the larger circle and the area of the smaller circle is πR2πr2=π(Rr)(R+r)=12[2π(Rr)](R+r)=12(3)(10)=15 Therefore, the difference between the areas is 15 cm2.

    1. When the price of $p is raised by n%, the price is multiplied by 1+n100.

      When the new price is reduced by 20%, the new price is multiplied by 120100=80100.

      Therefore, after these two price adjustments, the price is $p(1+n100)(80100).

      We are told that this final price is 20% higher than $p, and so the final price equals $p(1+20100) or $p(120100).

      In other words, $p(1+n100)(80100)=$p(120100) Simplifying and using the fact that p0, we obtain 80(1+n100)=120.

      Thus, 1+n100=12080=32=150100 and so n100=50100 or n=50.

    2. Solution 1

      Let m=f(n). The equation f(f(n))=3 becomes f(m)=3.

      Suppose that f(m)=3 and m is odd.

      By definition, we have f(m)=m1=3 and so m=4, which is not odd, so this case cannot happen.

      Suppose that f(m)=3 and m is even.

      By definition, we have f(m)=m21=3 and so m2=4 or m=±2, each of which is even.

      Therefore, if f(f(n))=3, then f(n)=2 or f(n)=2.

      Suppose that f(n)=2 or f(n)=2 and n is odd.

      By definition, we have n1=2 (giving n=3) or n1=2 (giving n=1). Each of these resulting values of n is odd.

      Suppose that f(n)=2 or f(n)=2 and n is even.

      Then n21=2 or n21=2 which give n2=3 or n2=1, neither of which is possible if n is an integer.

      Thus, the integers n for which f(f(n))=3 are n=3 and n=1.

      (We can check by substitution that each of these satisfies the original equation.)

      Solution 2

      We consider the cases of n even and n odd separately.

      Suppose that n is even.

      Then n2 is even and so f(n)=n21 must be odd.

      Thus, f(f(n))=f(n21)=(n21)1=n22, since f(m)=m1 when m is odd.

      For n to be even and f(f(n))=3, we must have n22=3 or n2=5.

      There are no integer solutions to this equation, and so there are no solutions in this case.

      Suppose that n is odd.

      Then f(n)=n1 must be even.

      Thus, f(f(n))=f(n1)=(n1)21=n22n+11=n22n.

      For n to be odd and f(f(n))=3, we must have n22n=3 or n22n3=0.

      Factoring, we obtain (n3)(n+1)=0 and so n=3 or n=1, both of which are odd.

      Thus, the integers n for which f(f(n))=3 are n=3 and n=1.

      (We can check by substitution that each of these satisfies the original equation.)

    1. Since 10y0, the equation 132=x10y is equivalent to 10y=32x.

      So the given question is equivalent to asking for the smallest positive integer x for which 32x equals a positive integer power of 10.

      Now 32=25 and so 32x=25x.

      For 32x to equal a power of 10, each factor of 2 must be matched with a factor of 5.

      Therefore, x must be divisible by 55 (that is, x must include at least 5 powers of 5), and so x55=3125.

      But 32(55)=2555=105, and so if x=55=3125, then 32x is indeed a power of 10, namely 105.

      This tells us that the smallest positive integer x for which 132=x10y for some positive integer y is x=55=3125.

    2. Solution 1

      Since the three side lengths of a right-angled triangle form an arithemetic sequence and must include 60, then the three side lengths are 60,60+d,60+2d or 60d,60,60+d or 602d,60d,60, for some d0.

      For a triangle with sides of length 60,60+d,60+2d to be right-angled, by the Pythagorean Theorem, the following equivalent equations must be true: 602+(60+d)2=(60+2d)23600+3600+120d+d2=3600+240d+4d20=3d2+120d36000=d2+40d12000=(d+60)(d20) (Note that, since d0, then 60+2d must be the hypotenuse of the triangle.)

      Since d0, then d=20, which gives the triangle with side lengths 60,80,100.

      The longest side length is the hypotenuse and the shorter two sides meet at right angles, giving an area of 12(60)(80)=2400.

      For a triangle with sides of length 60d,60,60+d to be right-angled, by the Pythagorean Theorem, the following equivalent equations must be true: (60d)2+602=(60+d)23600120d+d2+3600=3600+120d+d23600=240dd=15 Since d0, then d=15 is admissible, which gives the triangle with side lengths 45,60,75.

      Using a similar analysis, the area of this triangle is 12(45)(60)=1350.

      For a triangle with sides of length 602d,60d,60 to be right-angled, by the Pythagorean Theorem, the following equivalent equations must be true: (602d)2+(60d)2=6023600240d+4d2+3600120d+d2=36005d2360d+3600=0d272d+720=0(d60)(d12)=0 Since d0, then d=60 or d=12, which give possible side lengths of 60,0,60 (which do not form a triangle) and 36,48,60 (which do form a triangle).

      Using a similar analysis, the area of this triangle is 12(36)(48)=864.

      Therefore, the possible values for the area of such a triangle are 2400, 1350, and 864.

      Solution 2

      Suppose that a triangle has side lengths in arithemetic sequence.

      Then the side lengths can be written as ad,a,a+d for some a>0 and d0.

      Note that adaa+d.

      For such a triangle to be right-angled, by the Pythagorean Theorem, the following equivalent equations are true: (ad)2+a2=(a+d)2a22ad+d2+a2=a2+2ad+d2a2=4ad Since a>0, then a=4d, and so the side lengths of the triangle are ad=3d, a=4d, and a+d=5d for some d0.

      (Note that such triangles are all similar to the 3-4-5 triangle.)

      If such a triangle has 60 as a side length, then there are three possibilities:

      1. 3d=60: This gives d=20 and side lengths 60,80,100.

        Since the triangle is right-angled and its hypotenuse has length 100, then its area will equal 12(60)(80)=2400.

      2. 4d=60: This gives d=15 and side lengths 45,60,75.

        In a similar way to case (i), its area will equal 12(45)(60)=1350.

      3. 5d=60: This gives d=12 and side lengths 36,48,60.

        In a similar way to case (i), its area will equal 12(36)(48)=864.

      Therefore, the possible values for the area of such a triangle are 2400, 1350, and 864.

    1. Solution 1

      Suppose that Amrita paddles the kayak for p km and swims for s km.

      Since Amrita leaves the kayak in the lake and it does not move, then Zhang swims p km and paddles the kayak for s km.

      Note that each paddles at 7 km/h and each swims at 2 km/h and each takes exactly 90 minutes (or 1.5 hours) to complete the trip.

      If s<p, then Amrita would paddle farther and swim less distance than Zhang and so would reach the other side in less time than Zhang.

      If s>p, then Zhang would paddle farther and swim less distance than Amrita and so would reach the other side in less time than Amrita.

      Since they each take 90 minutes, then we must have s=p.

      Alternatively, since each paddles at 7 km/h and each swims at 2 km/h and each takes exactly 90 minutes (or 1.5 hours) to complete the trip, then we obtain the two equations p7+s2=1.5p2+s7=1.5 Using the fact that the right sides of these equations are equal, we obtain p7+s2=s7+p2s2s7=p2p7s(1217)=p(1217)s=p Therefore, p7+p2=1.5 or 914p=1.5=32 and so p=73.

      For Amrita to paddle these 73 km at 7 km/h, it takes 7/37=13 hour, or 20 minutes.

      For Zhang to swim these 73 km at 2 km/h, it takes 7/32=76 hour, or 70 minutes.

      The kayak is not being paddled for the period of time from when Amrita stops paddling to the time when Zhang stops swimming, which is a period of 7020=50 minutes.

      Solution 2

      Let t1 hours be the length of time during which Amrita paddles and Zhang swims.

      Let t2 hours be the length of time during which Amrita swims and Zhang swims; the kayak is not moving during this time.

      Let t3 hours be the length of time during which Amrita swims and Zhang paddles.

      Let d km be the total distance across the lake.

      Since Amrita paddles at 7 km/h and swims at 2 km/h, then 7t1+2t2+2t3=d.

      Since Zhang paddles at 7 km/h and swims at 2 km/h, then 2t1+2t2+7t3=d.

      Since the kayak travels at 7 km/h and does not move while both Amrita and Zhang are swimming, then 7t1+0t2+7t3=d.

      Since Amrita and Zhang each take 90 minutes (32 hours) to cross the lake, then the total time gives t1+t2+t3=32.

      From 7t1+2t2+2t3=d and 2t1+2t2+7t3=d, we obtain 7t1+2t2+2t3=2t1+2t2+7t3 or 5t1=5t3 and so t1=t3.

      Since 7t1+2t2+2t3=d and 7t1+0t2+7t3=d and t1=t3, then 7t1+2t2+2t1=7t1+7t1 or 2t2=5t1 or t2=52t1.

      Since t1+t2+t3=32, then t1+52t1+t1=32 or 92t1=32 and so t1=13.

      Thus, t2=5213=56 hours (or 50 minutes) is the period of time that the kayak is not moving.

    2. From the first equation, x(12+y2x2)=0, we obtain x=0 or 12+y2x2=0.

      From the second equation, y(52+xy)=0, we obtain y=0 or 52+xy=0.

      If x=0, the first equation is satisified.

      For the second equation to be true in this case, we need y=0 (giving the solution (0,0)) or 52+0y=0. The second equation gives y=52 (giving the solution (0,52)).

      If y=0, the second equation is satisified.

      For the first equation to be true in this case, we need x=0 (giving the solution (0,0)) or 12+02x2=0. The second equation gives x2=14 or x=±12 (giving the solutions (12,0) and (12,0)).

      So far, we have accounted for all solutions with x=0 or y=0.

      If x0 and y0, then for both equations to be true, we need 12+y2x2=0 (or 1+2y4x2=0) and 52+xy=0 (or 5+2x2y=0).

      Adding these two equations, we obtain 6+2x4x2=0.

      This is equivalent to 2x2x3=0 or (2x3)(x+1)=0, whose solutions are x=32 and x=1.

      The equation 52+xy=0 tells us that y=x+52.

      If x=32, then y=4; if x=1, then y=32.

      Therefore, the complete list of pairs that satisfy the given system of equations is (x,y)=(0,0),(0,52),(12,0),(12,0),(32,4),(1,32) .

    1. Let EAF=θ.

      Since ABCD is a parallelogram, then AB and DC are parallel with AB=DC, and DA and CB are parallel with DA=CB.

      Since AE is perpendicular to DC and AB and DC are parallel, then AE is perpendicular to AB.

      In other words, EAB=90, and so FAB=90θ.

      Since AFB is right-angled at F and FAB=90θ, then ABF=θ.

      Using similar arguments, we obtain that DAE=90θ and ADE=θ.

      Since cos(EAF)=cosθ=13 and cos2θ+sin2θ=1, then sinθ=1cos2θ=119=89=223 (Note that sinθ>0 since θ is an angle in a triangle.)

      In AFB, sinθ=AFAB and cosθ=FBAB.

      Since AF=32 and sinθ=223, then AB=AFsinθ=3222/3=482=242.

      Since AB=242 and cosθ=13, then FB=ABcosθ=242(13)=82.

      In AED, sinθ=AEAD and cosθ=DEAD.

      Since AE=20 and sinθ=223, then AD=AEsinθ=2022/3=302=152.

      Since AD=152 and cosθ=13, then DE=ADcosθ=152(13)=52.

      (To calculate AD and DE, we could also have used the fact that ADE is similar to ABF.)

      Finally, the area of quadrilateral AECF equals the area of parallelogram ABCD minus the combined areas of AFB and ADE.

      The area of parallelogram ABCD equals ABAE=24220=4802.

      The area of AFB equals 12(AF)(FB)=12(32)(82)=1282.

      The area of AED equals 12(AE)(DE)=12(20)(52)=502.

      Thus, the area of quadrilateral AECF is 48021282502=3022.

    2. Note that x1 since 1 cannot be the base of a logarithm. This tells us that logx0.

      Using the fact that logab=logbloga and then using other logarithm laws, we obtain the following equivalent equations: log4xlogx16=76logx8logxlog4log16logx=76log8logx(note that x1, so logx0)logxlog4=76+log16log8logxlogxlog(22)=76+log(168)logxlogx2log2=76+log2logx12(logxlog2)=76+log2logx Letting t=logxlog2=log2x and noting that t0 since x1, we obtain the following equations equivalent to the previous ones: t2=76+1t3t2=7t+6(multiplying both sides by 6t)3t27t6=0(3t+2)(t3)=0 Therefore, the original equation is equivalent to t=23 or t=3.

      Converting back to the variable x, we obtain log2x=23 or log2x=3, which gives x=22/3 or x=23=8.

    1. There are 210=1024 strings of ten letters, each of which is A or B, because there are 2 choices for each of the 10 positions in the string.

      We determine the number of these strings that do not include the “substring” ABBA (that is, that do not include consecutive letters ABBA) by counting the number of strings that do include the substring ABBA and subtracting this total from 1024.

      If a string includes the substring ABBA, there are 7 possible positions in which this substring could start (ABBAxxxxxx, xABBAxxxxx, , xxxxxxABBA).

      There are 2 choices for each of the remaining 6 letters in such a string, so there are 726=448 occurrences of the substring ABBA among the 1024 strings.

      This does not mean that there are 448 strings that contain the substring ABBA. Since ABBA can appear multiple times in a single string, this total will count some strings more than once. (For example, the string ABBAAAABBA is included in both the first and seventh of these categories, so this string is counted twice.)

      So we must “correct” this total of 448 by accounting for the strings in which ABBA occurs more than once.

      We note that, since two substrings of ABBA can overlap in 0 letters (for example, ABBAABBAxx) or in 1 letter (for example, ABBABBAxxx), then the maximum number of times that the substring ABBA can appear is 3, and there is only one such string: ABBABBABBA.

      If a string contains two copies of ABBA that overlap, then it must be of one of the following forms:

      ABBABBAxxxxABBABBAxxxxABBABBAxxxxABBABBA Since there are 4 choices for the starting position of ABBABBA and 2 choices for each of the three unknown letters, then there are 423=32 occurrences of ABBABBA among all of these strings.

      But the string ABBABBABBA is counted in each of the first and last categories, so we subtract 2 occurrences from this total to obtain 30, the total number of strings of ten letters that included exactly two overlapping copies of ABBA. (We’ll count the string ABBABBABBA later.)

      If a string contains exactly two substrings of ABBA and these do not overlap, then it must be of one of the following forms:

      ABBAABBAxxABBAxABBAxABBAxxABBA xABBAABBAxxABBAxABBAxxABBAABBA Since there are 6 such forms and 2 choices for each of the 2 unknown letters in each case, then there appear to be 622=24 such strings.

      This total includes the string ABBABBABBA in the third category, so we subtract 1 from this total to obtain 23, the total number of strings of ten letters that include exactly two copies of ABBA which do not overlap.

      So there are 30 strings that contain exactly two overlapping substrings ABBA, 23 strings that contain exactly two non-overlapping substrings ABBA, and 1 string that contains exactly three substrings ABBA.

      To get the total number of strings with one or more substrings ABBA we take the total number of occurrences of ABBA (448), subtract the number of strings with exactly two substrings ABBA (since these were included twice in the original count), and subtract two times the number of strings with exactly three substrings ABBA (since these were included three times in the original count).

      Therefore, there are 448233021=393 strings that include at least one substring ABBA, and so there are 1024393=631 strings of ten letters that do not include the substring ABBA.

    2. Solution 1

      Rotate DFC through an angle of 90 counterclockwise about D, so that DC now lies along DA and F is outside the square, as shown.

      Join F to E.

      Since AC is a diagonal of square ABCD, then EAD=FCD=45.

      Since EAD=45 and FAD=FCD=45, then FAE=45+45=90.

      By the Pythagorean Theorem in FAE, we have FE2=FA2+AE2.

      But FA=FC=z and AE=x, so FE2=z2+x2.

      To show that y2=x2+z2, it is sufficient to show that FE=y.

      Consider FDE and FDE.

      Note that FD=FD and FDA=FDC by construction and ED=ED.

      Also, FDE=FDA+EDA=FDC+EDA=90EDF=45, which tells us that FDE=FDE=45.

      Therefore, FDE is congruent to FDE (side-angle-side), and so FE=FE=y.

      This gives us the desired conclusion that y2=x2+z2.

      Solution 2

      Since AC is a diagonal of square ABCD, then EAD=FCD=45.

      Let ADE=θ.

      Since the angles in a triangle have a sum of 180, then AED=180EADADE=18045θ=135θ Since AEF is a straight angle, then DEF=180AED=180(135θ)=45+θ.

      Continuing in this way, we find that EFD=90θ, DFC=90+θ, and FDC=45θ.

      Using the sine law in AED, we see that AEsinADE=EDsinEAD or xsinθ=EDsin45.

      Using the sine law in DEF, we see that EFsinEDF=EDsinEFD or ysin45=EDsin(90θ).

      Using the sine law in DEF, we see that EFsinEDF=FDsinDEF or ysin45=FDsin(45+θ).

      Using the sine law in DFC, we get FCsinFDC=FDsinDCF or zsin(45θ)=FDsin45.

      Dividing the first of these equations by the second, we obtain xsin45ysinθ=sin(90θ)sin45 or xy=sin(90θ)sinθsin245.

      Dividing the fourth of these equations by the third, we obtain zsin45ysin(45θ)=sin(45+θ)sin45 or zy=sin(45+θ)sin(45θ)sin245.

      Since sin(90α)=cosα for every angle α, then sin(90θ)=cosθ.

      Also, sin(45+θ)=sin(90(45θ))=cos(45θ).

      Using this and the fact that 1sin245=1(1/2)2=2, the expressions for xy and zy become xy=2cosθsinθ=sin2θ and zy=2cos(45θ)sin(45θ)=sin(2(45θ))=sin(902θ)=cos2θ Finally, this tells us that x2y2+z2y2=(xy)2+(zy)2=sin22θ+cos22θ=1 Since x2y2+z2y2=1, then x2+z2=y2, as required.

    1. Here, k=10 and so there are 10 balls in each bag.

      Since there are 10 balls in each bag, there are 1010=100 pairs of balls that can be chosen.

      Let a be the number on the first ball chosen and b be the number on the second ball chosen. To determine P(10), we count the number of pairs (a,b) for which ab is divisible by 10.

      If the number of pairs is m, then P(10)=m100.

      For ab to be divisible by 10, at least one of a and b must be a multiple of 5 and at least one of a and b must be even.

      If a=10 or b=10, then the pair (a,b) gives a product ab divisible by 10.

      In this case, we obtain the 19 pairs (a,b)=(1,10),(2,10),,(9,10),(10,10),(10,9),,(10,2),(10,1) If neither a nor b equals 10, then either a=5 or b=5 in order for a or b to be divisible by 5.

      In this case, the other of a and b must be even and not equal to 10. (We have already counted the pairs where a=10 or b=10.)

      In this case, we obtain the 8 pairs (a,b)=(5,2),(5,4),(5,6),(5,8),(2,5),(4,5),(6,5),(8,5) From our work above, there are no additional pairs for which ab is divisible by 10.

      Thus, there are 19+8=27 pairs (a,b) for which ab is divisible by 10, which means that P(10)=27100.

      (We note that we could have made a 10 by 10 table that listed all possible combinations of a and b and their product, from which we could obtain P(10).)

    2. Let n be a positive integer with n2.

      Consider f(n)=2n1. This is a polynomial in n.

      We demonstrate that P(n)2n1n2 for all positive integers n with n2 and that P(n)=2n1n2 for infinitely many positive integers n with n2.

      Suppose that there are two bags, each containing n balls labelled from 1 to n.

      Since there are n balls in each bag, there are n2 pairs of balls that can be chosen.

      Let a be the number on the first ball chosen and b be the number on the second ball chosen.

      The pairs (a,b)=(1,n),(2,n),,(n1,n),(n,n),(n,n1),,(n,2),(n,1) each have the property that ab is divisible by n.

      There are (n1)+1+(n1)=2n1 of these pairs.

      Therefore, at least 2n1 of the pairs of balls that can be chosen have labels whose product is divisible by n.

      Since there are n2 pairs that can be chosen and the number of pairs of balls with the desired property is at least 2n1, then P(n)2n1n2.

      This proves the first part of what we needed to prove.

      Next, suppose that n=p, a prime number.

      For ab to be divisible by p, then either a is divisible by p or b is divisible by p (or both). (This property is not true when p is not a prime number; for example, 22 is divisible by 4 even though neither factor is divisible by 4.)

      Since 1ap and 1bp, then if either a is divisible by p or b is divisible by p (or both), we must have either a=p or b=p, or both.

      In other words, ab is divisible by p exactly when (a,b) is in the list (1,p),(2,p),,(p1,p),(p,p),(p,p1),,(p,2),(p,1) There are 2p1 pairs in this list and these are the only pairs for which ab is divisible by p.

      Therefore, P(n)=2n1n2 when n is a prime number.

      Since there are infinitely many prime numbers, then P(n)=2n1n2 for infinitely many positive integers n with n2.

      Thus, f(n)=2n1 is a polynomial with the desired properties.

    3. Let N=2k, where k is a positive integer with k2.

      Suppose that there are two bags, each containing N balls labelled from 1 to N.

      Since there are N balls in each bag, there are N2 pairs of balls that can be chosen.

      Let a be the number on the first ball chosen and b be the number on the second ball chosen.

      Let j be a positive integer with 1jk1.

      Consider pairs of the form (a,b)=(2jx,2kjy) where x and y are odd positive integers that keep a and b in the desired range.

      Note that, in each case, ab=(2jx)(2kjy)=2kxy which is divisible by N=2k.

      Since 1a2k, then 12jx2k and so x2kj.

      Since half of the positive integers from 1 to 2kj are odd, then there are 122kj=2kj1 choices for x.

      Similarly, there are 2k(kj)1=2j1 choices for y.

      Note that each choice of x and y gives a unique pair (a,b).

      For any fixed j, there are 2kj1 choices for x and 2j1 choices for y.

      Thus, there are 2kj12j1=2k2 choices of this form for the pair (a,b).

      So for a fixed j with 1jk1, this method gives 2k2 pairs (a,b) for which ab is divisible by N.

      Since there are k1 different values for j, then there are at least (k1)2k2 pairs (a,b) for which ab is divisible by N. (Note that two pairs that come from different values of j will in fact be different since the number of factors of 2 in their values of a will be different.)

      Since there are N2 choices for (a,b), then P(N)(k1)2k2N2=(k1)2k22N2=k141N When k14>2016, we will have P(N)>20161N.

      The inequality k14>2016 is equivalent to k1>8064 or k>8065.

      We want to show that there exists a positive integer m with P(m)>2016m.

      Set m=28066.

      By the work above, P(m)806541m>2016m, as required.