2018 AIME II 考试答案

Scroll down to view professionally curated solutions from LIVE by Po-Shen Loh, print PDF solutions, view answer key, or:

Try Exam

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

1.

Points A,A, B,B, and CC lie in that order along a straight path where the distance from AA to CC is 18001800 meters. Ina runs twice as fast as Eve, and Paul runs twice as fast as Ina. The three runners start running at the same time with Ina starting at AA and running toward C,C, Paul starting at BB and running toward C,C, and Eve starting at CC and running toward A.A. When Paul meets Eve, he turns around and runs toward A.A. Paul and Ina both arrive at BB at the same time. Find the number of meters from AA to B.B.

Concepts:relative speeddistance rate and timelinear equation

Difficulty rating: 1950

Solution:

Let x=AB,x = AB, so BC=1800x,BC = 1800 - x, and let Eve's speed be v,v, so Ina runs at 2v2v and Paul at 4v.4v. Paul and Eve start at BB and CC running toward each other, so together they cover the 1800x1800 - x meters between them, with Paul covering 45\frac{4}{5} of it. Paul then retraces that distance back to B,B, so when he reaches BB he has run 85(1800x)\frac{8}{5}(1800 - x) meters in total.

Ina reaches BB at the same moment, having run xx meters. Since Paul runs twice as fast as Ina, he has run 2x2x meters in that time. Therefore 85(1800x)=2x,\frac{8}{5}(1800 - x) = 2x, which gives 81800=18x,8 \cdot 1800 = 18x, so x=800.x = 800.

2.

Let a0=2,a_0 = 2, a1=5,a_1 = 5, and a2=8,a_2 = 8, and for n>2n \gt 2 define ana_n recursively to be the remainder when 4(an1+an2+an3)4(a_{n-1} + a_{n-2} + a_{n-3}) is divided by 11.11. Find a2018a2020a2022.a_{2018} \cdot a_{2020} \cdot a_{2022}.

Difficulty rating: 1970

Solution:

Computing successive terms gives 2, 5, 8, 5, 6, 10, 7, 4, 7, 6, 2, 5, 8, 2,\ 5,\ 8,\ 5,\ 6,\ 10,\ 7,\ 4,\ 7,\ 6,\ 2,\ 5,\ 8,\ \ldots Since (a10,a11,a12)=(2,5,8)=(a0,a1,a2)(a_{10}, a_{11}, a_{12}) = (2, 5, 8) = (a_0, a_1, a_2) and each term depends only on the previous three, the sequence is periodic with period 10.10.

Therefore a2018=a8=7,a_{2018} = a_8 = 7, a2020=a0=2,a_{2020} = a_0 = 2, and a2022=a2=8,a_{2022} = a_2 = 8, so the product is 728=112.7 \cdot 2 \cdot 8 = 112.

3.

Find the sum of all positive integers b<1000b \lt 1000 such that the base-bb integer 36b36_{b} is a perfect square and the base-bb integer 27b27_{b} is a perfect cube.

Solution:

The conditions say 3b+63b + 6 is a perfect square and 2b+72b + 7 is a perfect cube. Since 2b+72b + 7 is odd and b<1000b \lt 1000 forces 2b+7<2007,2b + 7 \lt 2007, the cube must be one of 1,1, 27,27, 125,125, 343,343, 729,729, 1331,1331, giving b=3,b = -3, 10,10, 59,59, 168,168, 361,361, 662.662.

The corresponding values of 3b+63b + 6 for the positive candidates are 36,36, 183,183, 510,510, 1089,1089, 1992,1992, and only 36=6236 = 6^2 (for b=10b = 10) and 1089=3321089 = 33^2 (for b=361b = 361) are perfect squares. The requested sum is 10+361=371.10 + 361 = 371.

4.

In equiangular octagon CAROLINE,CAROLINE, CA=RO=LI=NE=2CA = RO = LI = NE = \sqrt{2} and AR=OL=IN=EC=1.AR = OL = IN = EC = 1. The self-intersecting octagon CORNELIACORNELIA encloses six non-overlapping triangular regions. Let KK be the area enclosed by CORNELIA,CORNELIA, that is, the total area of the six triangular regions. Then K=ab,K = \frac{a}{b}, where aa and bb are relatively prime positive integers. Find a+b.a + b.

Solution:

Since the interior angles are all 135135^\circ and the 2\sqrt{2} sides are diagonals of unit squares, the octagon fits on a lattice: C=(0,0),C = (0, 0), A=(1,1),A = (1, 1), R=(2,1),R = (2, 1), O=(3,0),O = (3, 0), L=(3,1),L = (3, -1), I=(2,2),I = (2, -2), N=(1,2),N = (1, -2), E=(0,1).E = (0, -1). The path CORNELIACORNELIA is carried to itself by the 180180^\circ rotation about (32,12).(\tfrac{3}{2}, -\tfrac{1}{2}). Let YY and ZZ be the points where AIAI and RNRN cross CO,CO, and let W=AIRN.W = AI \cap RN. Segment AIAI has slope 3,-3, so Y=(43,0),Y = (\tfrac{4}{3}, 0), and by symmetry Z=(53,0)Z = (\tfrac{5}{3}, 0) and W=(32,12).W = (\tfrac{3}{2}, -\tfrac{1}{2}).

The six enclosed regions are the four congruent corner triangles like CAYCAY and the two small congruent triangles like YZW.YZW. Triangle CAYCAY has base CY=43CY = \tfrac{4}{3} and height 1,1, so its area is 23.\tfrac{2}{3}. Triangle YZWYZW has base YZ=13YZ = \tfrac{1}{3} and height 12,\tfrac{1}{2}, so its area is 112.\tfrac{1}{12}. Therefore K=423+2112=83+16=176,K = 4 \cdot \frac{2}{3} + 2 \cdot \frac{1}{12} = \frac{8}{3} + \frac{1}{6} = \frac{17}{6}, and a+b=17+6=23.a + b = 17 + 6 = 23.

5.

Suppose that x,x, y,y, and zz are complex numbers such that xy=80320i,xy = -80 - 320i, yz=60,yz = 60, and zx=96+24i,zx = -96 + 24i, where i=1.i = \sqrt{-1}. Then there are real numbers aa and bb such that x+y+z=a+bi.x + y + z = a + bi. Find a2+b2.a^2 + b^2.

Solution:

Multiplying the three equations gives (xyz)2=(80320i)(60)(96+24i)=806024(14i)(4+i)=2402(16+30i).(xyz)^2 = (-80 - 320i)(60)(-96 + 24i) = 80 \cdot 60 \cdot 24 \,(-1 - 4i)(-4 + i) = 240^2 (16 + 30i). Since 16+30i=(5+3i)2,16 + 30i = (5 + 3i)^2, we get xyz=±240(5+3i).xyz = \pm 240(5 + 3i).

Dividing xyzxyz by each given product yields x=xyzyz=±(20+12i),y=xyzzx=±(1010i),z=xyzxy=±(3+3i),x = \frac{xyz}{yz} = \pm(20 + 12i), \qquad y = \frac{xyz}{zx} = \pm(-10 - 10i), \qquad z = \frac{xyz}{xy} = \pm(-3 + 3i), with matching signs. Hence x+y+z=±(7+5i),x + y + z = \pm(7 + 5i), so (a,b)=±(7,5)(a, b) = \pm(7, 5) and a2+b2=49+25=74.a^2 + b^2 = 49 + 25 = 74.

6.

A real number aa is chosen randomly and uniformly from the interval [20,18].[-20, 18]. The probability that the roots of the polynomial x4+2ax3+(2a2)x2+(4a+3)x2x^4 + 2ax^3 + (2a - 2)x^2 + (-4a + 3)x - 2 are all real can be written in the form mn,\frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Solution:

Group the terms by whether they involve a:a: (x42x2+3x2)+2a(x3+x22x)=(x1)(x+2)(x2x+1)+2ax(x1)(x+2),(x^4 - 2x^2 + 3x - 2) + 2a(x^3 + x^2 - 2x) = (x - 1)(x + 2)(x^2 - x + 1) + 2ax(x - 1)(x + 2), so the polynomial factors as (x1)(x+2)(x2+(2a1)x+1).(x - 1)(x + 2)\left(x^2 + (2a - 1)x + 1\right).

All four roots are real exactly when the quadratic factor has real roots, i.e. when (2a1)240,(2a - 1)^2 - 4 \ge 0, which means a12a \le -\frac{1}{2} or a32.a \ge \frac{3}{2}. The excluded interval (12,32)\left(-\frac{1}{2}, \frac{3}{2}\right) has length 22 inside [20,18],[-20, 18], which has length 38,38, so the probability is 3638=1819.\frac{36}{38} = \frac{18}{19}. The requested sum is 18+19=37.18 + 19 = 37.

7.

Triangle ABCABC has side lengths AB=9,AB = 9, BC=53,BC = 5\sqrt{3}, and AC=12.AC = 12. Points A=P0,P1,P2,,P2450=BA = P_0, P_1, P_2, \ldots, P_{2450} = B are on segment AB\overline{AB} with PkP_k between Pk1P_{k-1} and Pk+1P_{k+1} for k=1,2,,2449,k = 1, 2, \ldots, 2449, and points A=Q0,Q1,Q2,,Q2450=CA = Q_0, Q_1, Q_2, \ldots, Q_{2450} = C are on segment AC\overline{AC} with QkQ_k between Qk1Q_{k-1} and Qk+1Q_{k+1} for k=1,2,,2449.k = 1, 2, \ldots, 2449. Furthermore, each segment PkQk,\overline{P_kQ_k}, k=1,2,,2449,k = 1, 2, \ldots, 2449, is parallel to BC.\overline{BC}. The segments cut the triangle into 24502450 regions, consisting of 24492449 trapezoids and 11 triangle. Each of the 24502450 regions has the same area. Find the number of segments PkQk,\overline{P_kQ_k}, k=1,2,,2450,k = 1, 2, \ldots, 2450, that have rational length.

Difficulty rating: 2650

Solution:

Since the 24502450 regions have equal areas, triangle APkQkAP_kQ_k (the union of the first kk regions) has area k2450\frac{k}{2450} of triangle ABC.ABC. Each triangle APkQkAP_kQ_k is similar to ABC,ABC, and lengths scale as the square root of areas, so PkQk=53k2450=53k352=6k14.P_kQ_k = 5\sqrt{3}\,\sqrt{\frac{k}{2450}} = 5\sqrt{3} \cdot \frac{\sqrt{k}}{35\sqrt{2}} = \frac{\sqrt{6k}}{14}.

This is rational exactly when 6k6k is a perfect square, which happens exactly when k=6j2k = 6j^2 for a positive integer j.j. The condition 6j224506j^2 \le 2450 gives j2408,j^2 \le 408, so j=1,2,,20.j = 1, 2, \ldots, 20. There are 2020 such segments.

8.

A frog is positioned at the origin in the coordinate plane. From the point (x,y),(x, y), the frog can jump to any of the points (x+1,y),(x + 1, y), (x+2,y),(x + 2, y), (x,y+1),(x, y + 1), or (x,y+2).(x, y + 2). Find the number of distinct sequences of jumps in which the frog begins at (0,0)(0, 0) and ends at (4,4).(4, 4).

Solution:

The horizontal jumps are steps of 11 or 22 summing to 4,4, so as a multiset they are {1,1,1,1},\{1,1,1,1\}, {1,1,2},\{1,1,2\}, or {2,2},\{2,2\}, and the same holds for the vertical jumps. For any choice of the two multisets, every ordering of all the jumps is a valid sequence, and the number of orderings is the multinomial coefficient of the combined multiset.

The nine cases give (84)=70,7!4!2!=105 (twice),6!4!2!=15 (twice),\binom{8}{4} = 70, \quad \frac{7!}{4!\,2!} = 105 \text{ (twice)}, \quad \frac{6!}{4!\,2!} = 15 \text{ (twice)}, 6!2!2!=180,5!2!2!=30 (twice),(42)=6.\frac{6!}{2!\,2!} = 180, \quad \frac{5!}{2!\,2!} = 30 \text{ (twice)}, \quad \binom{4}{2} = 6.

The total is 70+2105+215+180+230+6=556.70 + 2 \cdot 105 + 2 \cdot 15 + 180 + 2 \cdot 30 + 6 = 556.

9.

Octagon ABCDEFGHABCDEFGH with side lengths AB=CD=EF=GH=10AB = CD = EF = GH = 10 and BC=DE=FG=HA=11BC = DE = FG = HA = 11 is formed by removing four 66-88-1010 triangles from the corners of a 23×2723 \times 27 rectangle with side AH\overline{AH} on a short side of the rectangle, as shown. Let JJ be the midpoint of AH,\overline{AH}, and partition the octagon into 77 triangles by drawing segments JB,\overline{JB}, JC,\overline{JC}, JD,\overline{JD}, JE,\overline{JE}, JF,\overline{JF}, and JG.\overline{JG}. Find the area of the convex polygon whose vertices are the centroids of these 77 triangles.

Solution:

Each of the 77 triangles has JJ as a vertex, and the centroid of a triangle JVWJVW lies on the segment from JJ to the midpoint of VW,\overline{VW}, two-thirds of the way out. So the centroid heptagon is the image of the heptagon SS formed by the midpoints of AB,BC,,GH\overline{AB}, \overline{BC}, \ldots, \overline{GH} under a dilation centered at JJ with ratio 23,\frac{2}{3}, and its area is 49[S].\frac{4}{9}[S].

Place the rectangle with A=(0,6),A = (0, 6), B=(8,0),B = (8, 0), C=(19,0),C = (19, 0), D=(27,6),D = (27, 6), E=(27,17),E = (27, 17), F=(19,23),F = (19, 23), G=(8,23),G = (8, 23), H=(0,17),H = (0, 17), so J=(0,232).J = (0, \tfrac{23}{2}). The midpoints are (4,3),(4, 3), (272,0),(\tfrac{27}{2}, 0), (23,3),(23, 3), (27,232),(27, \tfrac{23}{2}), (23,20),(23, 20), (272,23),(\tfrac{27}{2}, 23), (4,20).(4, 20). The vertical segments at x=4,x = 4, x=272,x = \tfrac{27}{2}, and x=23x = 23 have lengths 17,17, 23,23, and 17,17, cutting SS into two trapezoids of height 192\tfrac{19}{2} and a triangle of height 4:4: [S]=217+232192+1742=380+34=414.[S] = 2 \cdot \frac{17 + 23}{2} \cdot \frac{19}{2} + \frac{17 \cdot 4}{2} = 380 + 34 = 414.

The requested area is 49414=184.\frac{4}{9} \cdot 414 = 184.

10.

Find the number of functions f(x)f(x) from {1,2,3,4,5}\{1, 2, 3, 4, 5\} to {1,2,3,4,5}\{1, 2, 3, 4, 5\} that satisfy f(f(x))=f(f(f(x)))f(f(x)) = f(f(f(x))) for all xx in {1,2,3,4,5}.\{1, 2, 3, 4, 5\}.

Difficulty rating: 3060

Solution:

Applying ff to f(f(x))=f(f(f(x)))f(f(x)) = f(f(f(x))) repeatedly shows the condition means that f(f(x))f(f(x)) is a fixed point of ff for every x.x. So the elements organize into levels: a nonempty set of ii fixed points, then jj elements whose image is a fixed point (but which are not fixed), and the remaining 5ij5 - i - j elements, each of which must map to one of the jj middle elements.

For given ii and jj there are (5i)\binom{5}{i} choices of fixed points, (5ij)\binom{5-i}{j} choices of the middle level, iji^j maps from the middle level to the fixed points, and j5ijj^{\,5-i-j} maps for the rest. Summing (5i)(5ij)ijj5ij\binom{5}{i}\binom{5-i}{j}\, i^j \, j^{\,5-i-j} over the valid pairs (all i1,i \ge 1, j1,j \ge 1, plus the identity case i=5i = 5) gives 20+120+60+5+60+240+80+60+90+20+1=756.20 + 120 + 60 + 5 + 60 + 240 + 80 + 60 + 90 + 20 + 1 = 756.

11.

Find the number of permutations of 1,2,3,4,5,61, 2, 3, 4, 5, 6 such that for each kk with 1k5,1 \le k \le 5, at least one of the first kk terms of the permutation is greater than k.k.

Solution:

The condition fails exactly when the first kk terms are a permutation of {1,,k}\{1, \ldots, k\} for some k5.k \le 5. For a permutation of 1,,n,1, \ldots, n, let kk be the smallest length for which the prefix is {1,,k}\{1, \ldots, k\} (the full length nn always works), and let cnc_n be the number of permutations whose smallest such kk is n.n. We want c6.c_6.

Every permutation of 1,,n1, \ldots, n decomposes uniquely as a minimal prefix of length kk (ckc_k choices) followed by any arrangement of the remaining nkn - k values, so k=1nck(nk)!=n!.\sum_{k=1}^{n} c_k \,(n-k)! = n!. Starting from c1=1,c_1 = 1, this gives c2=1,c_2 = 1, c3=3,c_3 = 3, c4=13,c_4 = 13, c5=71,c_5 = 71, and c6=720(1201+241+63+213+171)=720259=461.c_6 = 720 - (120 \cdot 1 + 24 \cdot 1 + 6 \cdot 3 + 2 \cdot 13 + 1 \cdot 71) = 720 - 259 = 461.

12.

Let ABCDABCD be a convex quadrilateral with AB=CD=10,AB = CD = 10, BC=14,BC = 14, and AD=265.AD = 2\sqrt{65}. Assume that the diagonals of ABCDABCD intersect at point P,P, and that the sum of the areas of triangles APBAPB and CPDCPD equals the sum of the areas of triangles BPCBPC and APD.APD. Find the area of quadrilateral ABCD.ABCD.

Difficulty rating: 3160

Solution:

Let a=AP,a = AP, b=BP,b = BP, c=CP,c = CP, d=DP,d = DP, and let θ=CPD.\theta = \angle CPD. Since sin(πθ)=sinθ,\sin(\pi - \theta) = \sin\theta, the equal-area condition 12(ab+cd)sinθ=12(ad+bc)sinθ\frac{1}{2}(ab + cd)\sin\theta = \frac{1}{2}(ad + bc)\sin\theta simplifies to (ac)(db)=0.(a - c)(d - b) = 0. By symmetry assume a=c.a = c.

The law of cosines in triangles BPCBPC and APBAPB (whose angles at PP are supplementary) gives a2+b2+2abcosθ=196a^2 + b^2 + 2ab\cos\theta = 196 and a2+b22abcosθ=100,a^2 + b^2 - 2ab\cos\theta = 100, so a2+b2=148a^2 + b^2 = 148 and abcosθ=24.ab\cos\theta = 24. Similarly triangles APDAPD and CPDCPD give a2+d2=180a^2 + d^2 = 180 and adcosθ=40.ad\cos\theta = 40. Dividing, db=53,\frac{d}{b} = \frac{5}{3}, while subtracting gives d2b2=32;d^2 - b^2 = 32; hence b=32,b = 3\sqrt{2}, d=52,d = 5\sqrt{2}, a2=130,a^2 = 130, and cos2θ=24213018=1665,\cos^2\theta = \frac{24^2}{130 \cdot 18} = \frac{16}{65}, so sinθ=765.\sin\theta = \frac{7}{\sqrt{65}}.

The total area is 12(a+c)(b+d)sinθ=a(b+d)sinθ=13082765=112.\frac{1}{2}(a + c)(b + d)\sin\theta = a(b + d)\sin\theta = \sqrt{130} \cdot 8\sqrt{2} \cdot \frac{7}{\sqrt{65}} = 112.

13.

Misha rolls a standard, fair six-sided die until she rolls 11-22-33 in that order on three consecutive rolls. The probability that she will roll the die an odd number of times is mn,\frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Solution:

Let aa be the probability that the total number of rolls is odd; let bb be that probability given that the first roll is a 1,1, and cc given that the first two rolls are 11-22 (in each case counting all rolls). Condition on the next roll, noting that whenever the count restarts, the rolls already used flip the required parity. Starting fresh: a 11 leads to state b;b; anything else uses one roll, after which an even continuation is needed. After a 1:1: another 11 means the first roll is wasted, needing an even continuation of the bb-type; a 22 leads to c;c; anything else wastes both rolls. After 11-2:2: a 33 finishes in 33 rolls (odd); a 11 restarts at the bb-state with two wasted rolls; anything else wastes all three. Thus a=16b+56(1a),b=16(1b)+16c+46a,c=16b+16+46(1a).a = \frac{1}{6}b + \frac{5}{6}(1 - a), \qquad b = \frac{1}{6}(1 - b) + \frac{1}{6}c + \frac{4}{6}a, \qquad c = \frac{1}{6}b + \frac{1}{6} + \frac{4}{6}(1 - a).

The first equation gives b=11a5;b = 11a - 5; substituting the third into the second yields 41b=11+20a,41b = 11 + 20a, so 41(11a5)=11+20a,41(11a - 5) = 11 + 20a, giving 431a=216431a = 216 and a=216431.a = \frac{216}{431}. Since 431431 is prime, m+n=216+431=647.m + n = 216 + 431 = 647.

14.

The incircle ω\omega of triangle ABCABC is tangent to BC\overline{BC} at X.X. Let YXY \neq X be the other intersection of AX\overline{AX} with ω.\omega. Points PP and QQ lie on AB\overline{AB} and AC,\overline{AC}, respectively, so that PQ\overline{PQ} is tangent to ω\omega at Y.Y. Assume that AP=3,AP = 3, PB=4,PB = 4, AC=8,AC = 8, and AQ=mn,AQ = \frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Solution:

Let ω\omega touch AB\overline{AB} at ZZ and AC\overline{AC} at W,W, and set α=BAX\alpha = \angle BAX and β=AXC.\beta = \angle AXC. The tangent-chord angle between PQPQ and chord XYXY equals the one between BCBC and XY,XY, so QYX=YXC=β,\angle QYX = \angle YXC = \beta, and vertical angles give AYP=β.\angle AYP = \beta. In triangle APYAPY the law of sines gives PY=APsinαsinβ,PY = AP\,\frac{\sin\alpha}{\sin\beta}, and by equal tangents PZ=PY,PZ = PY, so AZAP=1+PYAP=1+sinαsinβ.\frac{AZ}{AP} = 1 + \frac{PY}{AP} = 1 + \frac{\sin\alpha}{\sin\beta}. In triangle ABX,ABX, since AXB=180β,\angle AXB = 180^\circ - \beta, similarly BX=ABsinαsinβ,BX = AB\,\frac{\sin\alpha}{\sin\beta}, and BZ=BXBZ = BX gives AZAB=1sinαsinβ.\frac{AZ}{AB} = 1 - \frac{\sin\alpha}{\sin\beta}.

Adding the two relations, AZAP+AZAB=2,\frac{AZ}{AP} + \frac{AZ}{AB} = 2, so with AP=3AP = 3 and AB=7AB = 7 we get AZ(13+17)=2,AZ\left(\frac{1}{3} + \frac{1}{7}\right) = 2, hence AZ=215.AZ = \frac{21}{5}. The identical argument on side ACAC (using XAC\angle XAC in triangles AQYAQY and ACXACX) gives AWAQ+AWAC=2,\frac{AW}{AQ} + \frac{AW}{AC} = 2, and AW=AZ=215AW = AZ = \frac{21}{5} by equal tangents from A.A. Therefore 1AQ=102118=59168,\frac{1}{AQ} = \frac{10}{21} - \frac{1}{8} = \frac{59}{168}, so AQ=16859AQ = \frac{168}{59} and m+n=168+59=227.m + n = 168 + 59 = 227.

15.

Find the number of functions ff from {0,1,2,3,4,5,6}\{0, 1, 2, 3, 4, 5, 6\} to the integers such that f(0)=0,f(0) = 0, f(6)=12,f(6) = 12, and xyf(x)f(y)3xy|x - y| \le |f(x) - f(y)| \le 3|x - y| for all xx and yy in {0,1,2,3,4,5,6}.\{0, 1, 2, 3, 4, 5, 6\}.

Solution:

Let di=f(i)f(i1),d_i = f(i) - f(i-1), so each di{1,2,3}|d_i| \in \{1, 2, 3\} and d1++d6=12.d_1 + \cdots + d_6 = 12. If kk of the differences were negative, the sum would be at most 3(6k)k=184k,3(6 - k) - k = 18 - 4k, so k1.k \le 1. If no difference is negative, the solutions of a+b+c=6,a + b + c = 6, a+2b+3c=12a + 2b + 3c = 12 (with a,b,ca, b, c counting 11s, 22s, 33s) are (0,6,0),(0,6,0), (1,4,1),(1,4,1), (2,2,2),(2,2,2), (3,0,3),(3,0,3), and all such orderings satisfy every pair condition, giving (60,6,0)+(61,4,1)+(62,2,2)+(63,0,3)=1+30+90+20=141.\binom{6}{0,6,0} + \binom{6}{1,4,1} + \binom{6}{2,2,2} + \binom{6}{3,0,3} = 1 + 30 + 90 + 20 = 141.

If d1<0,d_1 \lt 0, then f(2)2|f(2)| \ge 2 with f(2)d1+3f(2) \le d_1 + 3 forces d1=1d_1 = -1 and d2=3;d_2 = 3; the remaining four differences are positive and sum to 10,10, giving (41,0,3)+(40,2,2)=4+6=10\binom{4}{1,0,3} + \binom{4}{0,2,2} = 4 + 6 = 10 functions, and the case d6<0d_6 \lt 0 is symmetric: 2020 in all. Finally, if dn+1<0d_{n+1} \lt 0 for some n=1,2,3,4,n = 1, 2, 3, 4, the pair conditions f(n+1)f(n1)2|f(n+1) - f(n-1)| \ge 2 and f(n+2)f(n)2|f(n+2) - f(n)| \ge 2 force dn+1=1d_{n+1} = -1 and dn=dn+2=3.d_n = d_{n+2} = 3. The other three differences are positive and sum to 7,7, achievable as two 33s and a 11 or a 33 and two 22s, each in 33 orders: 66 ways for each of the 44 positions, or 2424 functions.

The total is 141+20+24=185.141 + 20 + 24 = 185.