返回题库

AIME 2019 II · 第 14 题

AIME 2019 II — Problem 14

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

Find the sum of all positive integers nn such that, given an unlimited supply of stamps of denominations 5,n,5,n, and n+1n+1 cents, 9191 cents is the greatest postage that cannot be formed.

解析

Solution 1

We will do casework on n(mod5)n \pmod{5} and see which values work.

Case 1: n1(mod5)n \equiv 1 \pmod{5}

nn would have to be greater than 9191 because if it wasn't then we could just add denominations of 55 until we got to 91.91. However, if nn is more than 91,91, then all the numbers from 9191 to nn which are not multiples of 55 are also unrepresentable, which violates the problem's condition of 9191 being the largest unrepresentable number. So there are no values for this case.

Case 2: n2(mod5)n \equiv 2 \pmod{5}

n+13(mod5)n + 1 \equiv 3 \pmod{5} is the smallest formable number 3 mod 5, so n+15=n4n + 1 - 5 = n - 4 is the largest unformable number 3 mod 5. 2n+21(mod5)2n + 2 \equiv 1 \pmod{5} is the smallest formable number 1 mod 5, so 2n+25=2n32n + 2 - 5 = 2n - 3 is the largest unformable number 1 mod 5. Finally, 2n4(mod5)2n \equiv 4 \pmod{5} is the smallest formable number 4 mod 5, so 2n52n - 5 is the largest unformable number 4 mod 5.

Therefore, the largest unformable number overall is 2n31(mod5).2n - 3 \equiv 1 \pmod{5}. This satisfies the problem's condition! 2n3=91    n=47.2n - 3 = 91 \implies n = 47.

Case 3: n3(mod5)n \equiv 3 \pmod{5}

n+14(mod5),n + 1 \equiv 4 \pmod{5}, which is the smallest representable number 4 mod 5, so the largest unrepresentable number 4 mod 5 is n+15=n4.n + 1 - 5 = n -4.

Similarly, 2n1(mod5)2n \equiv 1 \pmod{5} is the smallest formable number 1 mod 5 and 3n+32(mod5)3n + 3 \equiv 2 \pmod{5} is the smallest formable number 2 mod 5 (isn't it 2n+12n + 1? ~Towerrocks), so the largest number 2 mod 5 that is unrepresentable is 3n+35=3n2,3n + 3 - 5 = 3n - 2, but the largest number 1 mod 5 that is unrepresentable is 2n5.2n -5. 3n2>2n5,3n - 2 > 2n - 5, so there would be a larger unrepresentable number than 9191 if we were to set 2n52n - 5 equal to it, which violates the problem's condition. And we can't set 3n23n - 2 equal to 9191 because 91≢2(mod5),91 \not\equiv 2 \pmod{5}, so there are no valid values for this case.

Case 4: n4(mod5)n \equiv 4 \pmod{5}

n+1n + 1 would be a multiple of 5,5, so we would be left with denominations of 55 and n.n. Then it would just be a straightforward application of the Chicken Mcnugget Theorem: 5nn5=91    n=24,5n - n - 5 = 91 \implies n = 24, which is indeed 4(mod5).4 \pmod{5}. So this value works.

Case 5: nn is a multiple of 5

In this case we’re left with denominations of 55 and n+1,n + 1, so by the Chicken Mcnugget Theorem we get 5(n+1)n6=91    n=23,5(n + 1) - n - 6 = 91 \implies n = 23, which is not a multiple of 5.5. So there are no valid values here.

The two valid values we found were 4747 and 24,24, so the answer is 47+24=71.47 + 24 = \boxed{71}.

~grogg007

Solution 2

Notice that if we let n+1n + 1 be a multiple of 5,5, then by the Chicken McNugget Theorem we have 5n(n+5)=91    n=24.5n - (n + 5) = 91 \implies n = 24. We find this is the smallest possible value of nn.

For a value of nn to work, we should not be able to form the value 91,91, but we should be able to form the values from 9292 to 9696. After 96,96, we can form any value by adding additional 55 cent stamps (92+5x92 + 5x, 93+5x93 + 5x, 94+5x94 + 5x, 95+5x95 + 5x, and 96+6x96 + 6x, where xx is a positive integer, together make all positive integers after 9696). We also need to be able to form 9696 using only denominations of nn and n+1,n + 1, because if we also used denominations of 5,5, then we could just remove a 55 cent stamp to get back to 91.91.

Now we can figure out the working (n,n+1)(n, n+1) pairs that can be used to obtain 9696. We also need to make sure we can get the numbers 929592 - 95 but not 9191 with denominations of 55. We can use no more than a total of 9624=4\frac{96}{24}=4 stamps. Let an+b(n+1)=96,an + b(n + 1) = 96, where aa is the number of nn stamps used and bb is the number of n+1n + 1 stamps used. The possible (a,b)(a,b) pairs are:

(a,b)(4,0),(3,1),(2,2),(1,3),(0,4),(3,0),(2,1),(1,2),(0,3),(2,0),(1,1),(0,2),(1,0),(0,1).(a,b) \rightarrow (4,0), (3,1), (2,2), (1,3), (0,4), (3,0), (2,1), (1,2), (0,3), (2,0), (1,1), (0,2), (1,0), (0,1). Solving for nn in each (a,b)(a,b) pair we find that the potential solutions are:

(n,n+1)(23,24),(24,25),(31,32),(32,33),(47,48),(48,49),(95,96),(96,97).(n, n + 1) \rightarrow (23,24), (24, 25), (31, 32), (32, 33), (47, 48), (48, 49), (95, 96), (96, 97). The first pair doesn't work because n24,n \geq 24, and the last two don't work either because they are too large to form the values 9292 through 9595. Finally, (31,32)(31,32) and (32,33)(32, 33) don't work because they can also form 9191 with denominations of 55 (for example, 320+332+55=9132 \cdot 0 + 33\cdot 2 + 5 \cdot 5 = 91). We are left with (24,25),(47,48),(48,49).(24, 25), (47, 48), (48,49). Now we need to make sure that 929592 - 95 can be formed. We know from the Chicken McNugget Theorem that 9191 is the largest unformable number with denominations 24,2524, 25 and 5,5, so this means that all numbers after 9191 should be formable, and we can bash to confirm that all numbers from 929592-95 can be formed with denominations of 47,48,47, 48, and 5.5. However, we find that 9292 cannot be formed with denominations of 48,49,48, 49, and 5,5, so n=48n = 48 is eliminated. Then n{24,47}n \in \{24, 47\}. The requested sum is 24+47=07124 + 47 = \boxed{071}.

~Revisions by emerald_block, Mathkiddie

Note on finding and testing potential pairs

In order to find potential (n,n+1)(n,n+1) pairs, we simply test all combinations of nn and n+1n+1 that sum to less than 4n4n (so that n24n\ge24) to see if they produce an integer value of nn when their sum is set to 9696. Note that, since 9696 is divisible by 11, 22, 33, and 44, we must either use only nn or only n+1n+1, as otherwise, the sum is guaranteed to not be divisible by one of the numbers 22, 33, and 44.

CombinationSumn-valuen,n,n,n4n24n+1,n+1,n+13n+331n,n,n3n32n+1,n+12n+247n,n2n48n+1n+195nn96\begin{array}{c|c|c} \text{Combination} & \text{Sum} & n\text{-value} \\ \hline n,n,n,n & 4n & 24 \\ n+1,n+1,n+1 & 3n+3 & 31 \\ n,n,n & 3n & 32 \\ n+1,n+1 & 2n+2 & 47 \\ n,n & 2n & 48 \\ n+1 & n+1 & 95 \\ n & n & 96 \\ \end{array}

To test whether a pair works, we simply check that, using the number 55 and the two numbers in the pair, it is impossible to form a sum of 9191, and it is possible to form sums of 9292, 9393, and 9494. (9595 can always be formed using only 55s, and the pair is already able to form 9696 because that was how it was found.) We simply need to reach the residues 22, 33, and 44(mod5)\pmod{5} using only nn and n+1n+1 without going over the number we are trying to form, while being unable to do so with the residue 11. As stated in the above solution, the last two pairs are clearly too large to work.

PairNot 9192939424,2531,32×32,33×47,4848,49×\begin{array}{c|c|c|c|c} \text{Pair} & \text{Not }91 & 92 & 93 & 94 \\ \hline 24,25 & \checkmark & \checkmark & \checkmark & \checkmark \\ 31,32 & \times & \checkmark & \checkmark & \checkmark \\ 32,33 & \times & \checkmark & \checkmark & \checkmark \\ 47,48 & \checkmark & \checkmark & \checkmark & \checkmark \\ 48,49 & \checkmark & \times & \checkmark & \checkmark \\ \end{array}

(Note that if a pair is unable to fulfill a single requirement, there is no need to check the rest.)

~emerald_block

Solution 3

Notice that once we hit all residues mod5\bmod 5, we'd be able to get any number greater (since we can continually add 55 to each residue). Furthermore, n≢0,1(mod5)n\not\equiv 0,1\pmod{5} since otherwise 9191 is obtainable (by repeatedly adding 55 to either nn or n+1n+1) Since the given numbers are 55, nn, and n+1n+1, we consider two cases: when n4(mod5)n\equiv 4\pmod{5} and when nn is not that.

When n4(mod5)n\equiv 4 \pmod{5}, we can only hit all residues mod5\bmod 5 once we get to 4n4n (since nn and n+1n+1 only contribute 11 more residue mod5\bmod 5). Looking at multiples of 44 greater than 9191 with n4(mod5)n\equiv 4\pmod{5}, we get n=24n=24. It's easy to check that this works. Furthermore, any nn greater than this does not work since 9191 isn't the largest unobtainable value (can be verified using Chicken McNugget Theorem).

Now, if n2,3(mod5)n\equiv 2,3\pmod{5}, then we'd need to go up to 2(n+1)=2n+22(n+1)=2n+2 until we can hit all residues mod5\bmod 5 since nn and n+1n+1 create 22 distinct residues mod5\bmod{5}. Checking for such nn gives n=47n=47 and n=48n=48. It's easy to check that n=47n=47 works, but n=48n=48 does not (since 9292 is unobtainable). Furthermore, any nn greater than this does not work since 9191 isn't the largest unobtainable value in those cases (can be verified using Chicken McNugget Theorem). (Also note that in the 3(mod5)3 \pmod{5} case, the residue 2(mod5)2 \pmod{5} has will not be produced until 3(n+1)3(n+1) while the 1(mod5)1\pmod5 case has already been produced, so the highest possible value that cannot be produced would not be a number equivalent to 1(mod5)1 \pmod5)

Since we've checked all residues mod5\bmod 5, we can be sure that these are all the possible values of nn. Hence, the answer is 24+47=07124+47=\boxed{071}. - ktong

Solution 4

Obviously n90n\le 90. We see that the problem's condition is equivalent to: 96 is the smallest number that can be formed which is 1 mod 5, and 92, 93, 94 can be formed (95 can always be formed). Now divide this up into cases. If n0(mod5)n\equiv 0\pmod{5}, then 91 can be formed by using n+1n+1 and some 5's, so there are no solutions for this case. If n1(mod5)n\equiv 1\pmod{5}, then 91 can be formed by using nn and some 5's, so there are no solutions for this case either.

For n2(mod5)n\equiv 2\pmod{5}, 2n+22n+2 is the smallest value that can be formed which is 1 mod 5, so 2n+2=962n+2=96 and n=47n=47. We see that 92=45+4792=45+47, 93=48+4593=48+45, and 94=47+4794=47+47, so n=47n=47 does work. If n3(mod5)n\equiv 3\pmod{5}, then the smallest value that can be formed which is 1 mod 5 is 2n2n, so 2n=962n=96 and n=48n=48. We see that 94=49+4594=49+45 and 93=48+4593=48+45, but 92 cannot be formed, so there are no solutions for this case. If n4(mod5)n\equiv 4\pmod{5}, then we can just ignore n+1n+1 since it is a multiple of 5, meaning that the Chicken McNugget theorem is a both necessary and sufficient condition, and it states that 5nn5=915n-n-5=91 meaning 4n=964n=96 and n=24n=24. Hence, the only two nn that work are n=24n=24 and n=47n=47, so our answer is 24+47=07124+47=\boxed{071}. -Stormersyle

Solution 5 (standard)

Consider a postage that gives 9696. We cannot use a 55-stamp as otherwise simply removing it yields a postage that gives 9191. Additionally, there cannot be at least 55 of nn-stamps or n+1n + 1-stamps, as else we can convert 55 of the same valued stamp into a positive number of 55-stamps, then remove one to get a postage of 9191.

From here consider integers 0a,b,40 \le a, b, \le 4 where an+b(n+1)=96    n=96ba+ban + b(n + 1) = 96 \implies n = \dfrac{96 - b}{a + b}. The only pairs (a,b)(a, b) that yield an integer value are (a,b)=(0,2),(0,3),(0,4),(1,0),(2,0),(3,0),(4,0),(4,1)(a, b) = (0, 2), (0, 3), (0, 4), (1, 0), (2, 0), (3, 0), (4, 0), (4, 1) which generate the values n=47,31,23,96,48,32,24,19n = 47, 31, 23, 96, 48, 32, 24, 19 respectively. It is easy to find counterexamples of postages that evaluate to 9191 besides n=24,47n = 24, 47.

Now for n=24n = 24 clearly 9191 is unobtainable since we need a 4(mod5)4 \pmod {5} amount of 2424-stamps which exceeds a value of 9696. A similar result holds for n=47n = 47 as any evaluation 247\le 2 \cdot 47 can only be 0,2,3(mod5)0, 2, 3 \pmod{5}. In both cases it is easy to construct a postage for 92,93,94,95,9692, 93, 94, 95, 96, to which repeatedly adding 55-stamps makes all postages worth >91>91 possible. The requesteed sum is 24+47=7124 + 47 = \boxed{71}.

- blueprimes

Solution 6

We can use the formula g=(maxj{1,2,,a11}Rj)a1g = \left( \max_{j \in \{1, 2, \ldots, a_1-1\}} R_j \right) - a_1, where gg is the Frobenius Number (in this case 91), a1a_1 is the smallest denomination (which is 5), j{1,2,,a11}j \in \{1, 2, \ldots, a_1-1\} represents a remainder (residue class) when you divide an integer by a1,a_1, and RjR_j is the smallest nonnegative integer such that an+b(n+1)j(mod5)a \cdot n + b \cdot (n + 1) \equiv j \pmod{5} where aa and bb are also nonnegative integers. So we have 91=(maxj{1,2,3,4}Rj)5    96=(maxj{1,2,3,4}Rj).91 = \left( \max_{j \in \{1, 2, 3, 4\}} R_j \right) - 5 \implies 96 = \left( \max_{j \in \{1, 2, 3, 4\}} R_j \right). This means that the largest of the RjR_j values must be equal to exactly 96.96. We will do casework on n(mod5).n \pmod{5}.

Case 1: n1(mod5).n \equiv 1 \pmod{5}.

n+12(mod5).n + 1 \equiv 2 \pmod{5}. Plug this in:

R1R_1: a1+b21(mod5)    a=1,b=0.a \cdot 1 + b \cdot 2 \equiv 1 \pmod{5} \implies a = 1, b = 0. So R1=1n+0(n+1)=n.R_1 = 1 \cdot n + 0 \cdot (n + 1) = n.

R2R_2: a1+b22(mod5)    a=0,b=1.a \cdot 1 + b \cdot 2 \equiv 2 \pmod{5} \implies a = 0, b = 1. So R2=0n+1(n+1)=n+1.R_2 = 0 \cdot n + 1 \cdot (n + 1) = n + 1.

R3R_3: a1+b23(mod5)    a=1,b=1.a \cdot 1 + b \cdot 2 \equiv 3 \pmod{5} \implies a = 1, b = 1. So R3=1n+1(n+1)=2n+1.R_3 = 1 \cdot n + 1 \cdot (n + 1) = 2n + 1.

R4R_4: a1+b24(mod5)    a=0,b=2.a \cdot 1 + b \cdot 2 \equiv 4 \pmod{5} \implies a = 0, b = 2. So R4=2n+2.R_4 = 2n + 2. This is the largest of the four RjR_j values. Setting this equal to 9696 we get n=47.n = 47. But this doesn't work because 4747 is not congruent to 1(mod5).1 \pmod{5}.

Case 2: n2(mod5).n \equiv 2 \pmod{5}.

n+13(mod5).n + 1 \equiv 3 \pmod{5}. Plug this in:

R1R_1: a2+b31(mod5)    a=0,b=2.a \cdot 2 + b \cdot 3 \equiv 1 \pmod{5} \implies a = 0, b = 2. So R1=0n+2(n+1)=2n+2.R_1 = 0 \cdot n + 2 \cdot (n + 1) = 2n + 2.

R2R_2: a2+b32(mod5)    a=1,b=0.a \cdot 2 + b \cdot 3 \equiv 2 \pmod{5} \implies a = 1, b = 0. So R2=1n+0(n+1)=n.R_2 = 1 \cdot n + 0 \cdot (n + 1) = n.

R3R_3: a2+b33(mod5)    a=0,b=1.a \cdot 2 + b \cdot 3 \equiv 3 \pmod{5} \implies a = 0, b = 1. So R3=0n+1(n+1)=n+1.R_3 = 0 \cdot n + 1 \cdot (n + 1) = n + 1.

R4R_4: a2+b34(mod5)    a=2,b=0.a \cdot 2 + b \cdot 3 \equiv 4 \pmod{5} \implies a = 2, b = 0. So R4=2n+0(n+1)=2n.R_4 = 2 \cdot n + 0 \cdot (n + 1) = 2n.

The largest of the four RjR_j values is R1=2n+2.R_1 = 2n + 2. Setting this equal to 9696 we get 2n+2=96    n=47.2n + 2 = 96 \implies n = 47. Now this works! 4747 is indeed 2(mod5).2 \pmod{5}.

Case 3: n3(mod5).n \equiv 3 \pmod{5}.

n+14(mod5).n + 1 \equiv 4 \pmod{5}. Plug this in:

R1R_1: a3+b41(mod5)    a=2,b=0.a \cdot 3 + b \cdot 4 \equiv 1 \pmod{5} \implies a = 2, b = 0. So R1=2n+0(n+1)=2n.R_1 = 2 \cdot n + 0 \cdot (n + 1) = 2n.

R2R_2: a3+b42(mod5)    a=1,b=1.a \cdot 3 + b \cdot 4 \equiv 2 \pmod{5} \implies a = 1, b = 1. So R2=1n+1(n+1)=2n+1.R_2 = 1 \cdot n + 1 \cdot (n + 1) = 2n + 1.

R3R_3: a3+b43(mod5)    a=1,b=0.a \cdot 3 + b \cdot 4 \equiv 3 \pmod{5} \implies a = 1, b = 0. So R3=1n+0(n+1)=n.R_3 = 1 \cdot n + 0 \cdot (n + 1) = n.

R4R_4: a3+b44(mod5)    a=0,b=1.a \cdot 3 + b \cdot 4 \equiv 4 \pmod{5} \implies a = 0, b = 1. So R4=0n+1(n+1)=n+1.R_4 = 0 \cdot n + 1 \cdot (n + 1) = n + 1.

The largest of the four RjR_j values is R2=2n+1.R_2 = 2n + 1. Setting this equal to 9696 we get n=47.5,n = 47.5, which is not an integer. So this doesn't work.

Case 4: n4(mod5).n \equiv 4 \pmod{5}.

We notice that n+1n + 1 will be a multiple of 5,5, so we're left with the denominations of 55 and nn. Since these are two relatively prime numbers, we can do a straightforward application of the Chicken Mcnugget Theorem to get 5n5n=91    n=24.5n - 5 - n = 91 \implies n = 24. This works because 244(mod5).24 \equiv 4 \pmod{5}.

Case 5: n0(mod5).n \equiv 0 \pmod{5}.

Same thing as case 4,4, only this time we are left with denominations of 55 and n+1.n + 1. Applying the Chicken Mcnugget Theorem gives 4n1=91    n=23,4n - 1 = 91 \implies n = 23, but this doesn't work because 2323 clearly isn't a multiple of 55.

The two valid values we found were 4747 and 24,24, so the sum is 71.\boxed{71}.

Video solution by grogg007:

https://www.youtube.com/watch?v=zv9_YrVebFI

Video solution: https://www.youtube.com/watch?v=fTZP2e-_rjA