Skip to main content

2015 AIME I Problem 9

Problem 9 of 15IntermediateAlgebraCombinatoricsProblem-Solving Techniques

Let SS be the set of all ordered triples of integers (a1,a2,a3)(a_1, a_2, a_3) with 1≤a1,1 \le a_1, a2,a_2, a3≤10.a_3 \le 10. Each ordered triple in SS generates a sequence according to the rule an=an−1⋅∣an−2−an−3∣a_n = a_{n-1} \cdot |a_{n-2} - a_{n-3}| for n≥4.n \ge 4. Find the number of such sequences for which an=0a_n = 0 for some n.n.

Your answer

Integer from 0 to 999
Show solution

Solution

If ak−1=aka_{k-1} = a_k then ak+2=ak+1∣ak−ak−1∣=0,a_{k+2} = a_{k+1}|a_k - a_{k-1}| = 0, and if ∣ak−ak−1∣=1|a_k - a_{k-1}| = 1 then ak+2=ak+1,a_{k+2} = a_{k+1}, so ak+4=0.a_{k+4} = 0. Hence every triple of one of the forms (j,j,k),(j,j,k), (j,k,k),(j,k,k), (j,j±1,k),(j,j\pm1,k), (j,k,k±1)(j,k,k\pm1) produces a 0.0. These forms contain 100+100+4⋅90=560100 + 100 + 4 \cdot 90 = 560 triples, but triples fitting two forms are counted twice: the 1010 of the form (j,j,j),(j,j,j), the 99 in each of the six families (j,j,j±1),(j,j,j\pm1), (j,j±1,j),(j,j\pm1,j), (j,j±1,j±1)(j,j\pm1,j\pm1) (matching signs), and the 88 in each of (j,j+1,j+2)(j,j+1,j+2) and (j,j−1,j−2).(j,j-1,j-2). That leaves 560−10−54−16=480560 - 10 - 54 - 16 = 480 triples. A few other triples also work: if (a1,a2,a3)=(j,j±2,1),(a_1, a_2, a_3) = (j, j\pm2, 1), then a4=2a_4 = 2 and ∣a4−a3∣=1,|a_4 - a_3| = 1, so a8=0.a_8 = 0. These 1616 triples include (3,1,1)(3,1,1) and (4,2,1),(4,2,1), which were already counted, so they add 1414 new ones, for 480+14=494.480 + 14 = 494. No other triple reaches 0:0: if both consecutive differences are at least 22 and a3≥2,a_3 \ge 2, then a4=a3∣a2−a1∣≥2a3>a3a_4 = a_3|a_2 - a_1| \ge 2a_3 \gt a_3 and ∣a4−a3∣≥a3≥2,|a_4 - a_3| \ge a_3 \ge 2, so inductively the terms grow forever and no factor ever vanishes. If instead a3=1a_3 = 1 with ∣a2−a1∣≥3,|a_2 - a_1| \ge 3, then a4≥3a_4 \ge 3 and ∣a4−a3∣≥2,|a_4 - a_3| \ge 2, and the same growth takes over. The count is 494.494.
AoPS wiki

Tagged: recursion · casework · inclusion-exclusion

More practice