Difference between revisions of "2020 AMC 10A Problems/Problem 24"

(Solution 2 (bashing))
(Added a solution)
 
(175 intermediate revisions by 37 users not shown)
Line 1: Line 1:
 
== Problem ==
 
== Problem ==
  
Let <math>n</math> be the least positive integer greater than <math>1000</math> for which<cmath>\gcd(63, n+120) =21\quad \text{and} \quad \gcd(n+63, 120)=60.</cmath>What is the sum of the digits of <math>n</math>?
+
Let <math>n</math> be the least positive integer greater than <math>1000</math> for which
 +
 
 +
<cmath>\gcd(63, n+120) =21\quad \text{and} \quad \gcd(n+63, 120)=60.</cmath>
 +
 
 +
What is the sum of the digits of <math>n</math>?
  
 
<math>\textbf{(A) } 12 \qquad\textbf{(B) } 15 \qquad\textbf{(C) } 18 \qquad\textbf{(D) } 21\qquad\textbf{(E) } 24</math>
 
<math>\textbf{(A) } 12 \qquad\textbf{(B) } 15 \qquad\textbf{(C) } 18 \qquad\textbf{(D) } 21\qquad\textbf{(E) } 24</math>
  
== Solution 1==
+
== Solution 1 ==  
 +
We know that <math>\gcd(n+57,63)=21</math> and <math>\gcd(n-57, 120)= 60</math> by the Euclidean Algorithm. Hence, let <math>n+57=21\alpha</math> and <math>n-57=60 \gamma</math>, where <math>\gcd(\alpha,3)=1</math> and <math>\gcd(\gamma,2)=1</math>. Subtracting the two equations, <math>38=7\alpha-20\gamma</math>. Letting <math>\gamma = 2s+1</math>, we get <math>58=7\alpha-40s</math>. Taking modulo <math>40</math>, we have <math>\alpha \equiv{14} \pmod{40}</math>. We are given that <math>n=21\alpha -57 >1000</math>, so <math>\alpha \geq 51</math>. Notice that if <math>\alpha =54</math> then the condition <math>\gcd(\alpha,3)=1</math> is violated. The next possible value of  <math>\alpha = 94</math> satisfies the given condition, giving us <math>n=1917</math>.
 +
 
 +
Alternatively, we could have said <math>\alpha = 40k+14 \equiv{0} \pmod{3}</math> for <math>k \equiv{1} \pmod{3}</math> only, so <math>k \equiv{0,2} \pmod{3}</math>, giving us our answer. Since the problem asks for the sum of the digits of <math>n</math>, our answer is <math>1+9+1+7=\boxed{\textbf{(C) } 18}</math>.
 +
 
 +
~Prabh1512
 +
 
 +
==Solution 2==
 +
The conditions of the problem reduce to the following: <math>n+120 = 21k</math> and <math>n+63 = 60\ell</math>, where <math>\gcd(k,3) = 1</math> and <math>\gcd(\ell,2) = 1</math>. From these equations, we see that <math>21k - 60\ell = 57</math>. Solving this Diophantine equation gives us that <math>k = 20a + 17</math> and <math>\ell = 7a + 5</math>. Since, <math>n>1000</math>, we can do some bounding and get that <math>k > 53</math> and <math>\ell > 17</math>. Now we start bashing by plugging in numbers that satisfy these conditions: <math>a=4</math> is the first number that works so we get <math>\ell = 33</math>, <math>k = 97</math>. Therefore, we have <math>n=21(97)-120=60(33)-63=1917</math>, and our answer is <math>1+9+1+7=\boxed{\textbf{(C) } 18}</math>.
 +
 
 +
==Solution 3==
 +
We first find that <math>n\equiv6\pmod{21}</math> and <math>n\equiv57\pmod{60}</math>, then we get <math>n=21x+6</math> and <math>n=60y+57</math> by definitions, where <math>x</math> and <math>y</math> are integers. It follows that <math>y</math> must be odd, since the GCD will be <math>120</math> instead of <math>60</math> if <math>y</math> is even. Also, the unit digit of <math>n</math> must be <math>7</math>, since the unit digit of <math>60y</math> is always <math>0</math> and the unit digit of <math>57</math> is <math>7</math>. Therefore, we find that <math>x</math> must end in <math>1</math> to satisfy <math>n</math> having a unit digit of <math>7</math>. Also, we find that <math>x</math> must not be a multiple of <math>3</math> or else the GCD will be <math>63</math>. Therefore, we test values for <math>x</math> and find that <math>x=91</math> satisfies all these conditions. Therefore, <math>n=1917</math> and <math>1+9+1+7 = \boxed{\textbf{(C) } 18}</math>.
 +
 
 +
~happykeeper
  
We know that <math>gcd(63, n+120)=21</math>, so we can write <math>n+120\equiv0\pmod {21}</math>. Simplifying, we get <math>n\equiv6\pmod {21}</math>. Similarly, we can write <math>n+63\equiv0\pmod {60}</math>, or <math>n\equiv-3\pmod {60}</math>. Solving these two modular congruences, <math>n\equiv237\pmod {420}</math> which we know is the only solution by CRT (Chinese Remainder Theorem). Now, since the problem is asking for the least positive integer greater than <math>1000</math>, we find the least solution is <math>n=1077</math>. However, we are have not considered cases where <math>gcd(63, n+120) =63</math> or <math>gcd(n+63, 120) =120</math>. <math>{1077+120}\equiv0\pmod {63}</math> so we try <math>n=1077+420=1497</math>. <math>{1497+63}\equiv0\pmod {120}</math> so again we add <math>420</math> to <math>n</math>. It turns out that <math>n=1497+420=1917</math> does indeed satisfy the original conditions, so our answer is <math>1+9+1+7=\boxed{\textbf{(C) } 18}</math>.
+
==Solution 4==
 +
We are given that <math>\gcd(63, n+120) =21</math> and <math>\gcd(n+63, 120)=60.</math> By applying the Euclidean algorithm in reverse, we have <cmath>\gcd(63, n+120) = \gcd(63, n+120 + 63) = \gcd(63, n+183) = 21</cmath> and <cmath>\gcd(n+63, 120) = \gcd(n+63 + 120, 120) = \gcd(n+183, 120) = 60.</cmath>
  
==Solution 2 (bashing)==
+
We now know that <math>n+183</math> must be divisible by <math>21</math> and <math>60,</math> so it is divisible by <math>\text{lcm}(21, 60) = 420.</math> Therefore, <math>n+183 = 420k</math> for some integer <math>k.</math> We know that <math>3 \nmid k,</math> or else the first condition won't hold (<math>\gcd</math> will be <math>63</math>) and <math>2 \nmid k,</math> or else the second condition won't hold (<math>\gcd</math> will be <math>120</math>). Since <math>k = 1</math> gives us too small of an answer, then <math>k=5,</math> from which <math>n = 1917.</math> So, the answer is <math>1+9+1+7 = \boxed{\textbf{(C) } 18}.</math>
  
We are given that <math>\gcd(63, n+120)=21</math> and <math>\gcd(n+63,120) = 60</math>. This tells us that <math>n+120</math> is divisible by <math>21</math> but not <math>63</math>. It also tells us that <math>n+63</math> is divisible by 60 but not 120. Starting, we find the least value of <math>n+120</math> which is divisible by <math>21</math> which satisfies the conditions for <math>n</math>, which is <math>1134</math>, making <math>n=1014</math>. We then now keep on adding <math>21</math> until we get a number which satisfies the second equation. This number turns out to be <math>1917</math>, whose digits add up to <math>\boxed{\textbf{(C) } 18}</math>.
+
==Solution 5==
 +
<math>\gcd(n+63,120)=60</math> tells us <math>n+63\equiv60\pmod {120}</math>. The smallest <math>n+63</math> that satisfies the previous condition and <math>n>1000</math> is <math>1140</math>, so we start from there. If <math>n+63=1140</math>, then <math>n+120=1197</math>. Because <math>\gcd(n+120,63)=21</math>, <math>n+120\equiv21\pmod {63}</math> or <math>n+120\equiv42\pmod {63}</math>. We see that <math>1197\equiv0\pmod {63}</math>, which does not fulfill the requirement for <math>n+120</math>, so we continue by keep on adding <math>120</math> to <math>1197</math>, in order to also fulfill the requirement for <math>n+63</math>. Soon, we see that <math>n+120\pmod {63}</math> decreases by <math>6</math> every time we add <math>120</math>, so we can quickly see that <math>n=1917</math> because at that point <math>n+120\equiv21\pmod {63}</math>. We add up all digits of <math>1917</math> to get <math>\boxed{\textbf{(C) } 18}</math>.
  
-Midnight
+
~SmileKat32
  
== Video Solution ==
+
==Solution 6==
 +
We are able to set up the following system of congruences:
 +
<cmath>\begin{align*}
 +
n &\equiv 6 \pmod {21}, \\
 +
n &\equiv 57 \pmod {60}.
 +
\end{align*}</cmath>
 +
Therefore, by definition, we are able to set-up the following system of equations:
 +
<cmath>\begin{align*}
 +
n &= 21a + 6, \\
 +
n &= 60b + 57.
 +
\end{align*}</cmath>
 +
Thus, we have <math>21a + 6 = 60b + 57,</math> from which <cmath>7a + 2 = 20b + 19.</cmath>
 +
We know <math>7a \equiv 0 \pmod {7},</math> and since <math>7a = 20b + 17,</math> therefore <math>20b + 17 \equiv 0 \pmod{7}.</math> Simplifying this congruence further, we have <cmath>b\equiv 3 \pmod{7}.</cmath>
 +
Thus, by definition, <math>b = 7x + 3.</math> Substituting this back into our original equation, we get <cmath>n = 60(7x + 3) + 57 = 420x + 237.</cmath>
 +
By definition, we are able to set up the following congruence:
 +
<cmath>n \equiv 237 \pmod{420}.</cmath>
 +
Thus, <math>n = 1917</math>, so our answer is simply <math>1+9+1+7=\boxed{\textbf{(C) } 18}</math>.
  
https://youtu.be/tk3yOGG2K-s - <math>Phineas1500</math>
+
<u><b>Remark</b></u>
 +
 
 +
Since <math>n \equiv -120 \pmod{21},</math> we conclude that <math>n \equiv 6 \pmod{21}.</math>
 +
 
 +
Since <math>n \equiv -63 \pmod{60},</math> we conclude that <math>n \equiv 57 \pmod{60}.</math>
 +
 
 +
Remember that  <math>b \equiv 3 \pmod{7}.</math>
 +
 
 +
Lastly, the reason why <math>n \neq 1077</math> is <math>n + 120</math> would be divisible by <math>63</math>, which is not possible due to the certain condition.
 +
 
 +
~nikenissan ~Midnight
 +
 
 +
== Solution 7==
 +
 
 +
First, we find <math>n</math>. We know that it is greater than <math>1000</math>, so we first input <math>n = 1000</math>. From the first equation, <math>\gcd(63, n + 120) = 21</math>, we know that if <math>n</math> is correct, after we add <math>120</math> to it, it should be divisible by <math>21</math>, but not <math>63</math>:
 +
<cmath>\frac{n + 120}{21} = \frac{1120}{21} = 53\text{ R }7.</cmath>
 +
This does not work. To get to the nearest number divisible by <math>21</math>, we have to add <math>14</math> to cancel out the remainder. (Note that we don't subtract <math>7</math> to get to <math>53</math>; <math>n</math> is already at its lowest possible value!)
 +
Adding <math>14</math> to <math>1000</math> gives us <math>n = 1014</math>. (Note: <math>n</math> is currently divisible by 63, but that's fine since we'll be changing it in the next step.)
 +
 
 +
Now using the second equation, <math>\gcd(n + 63, 120) = 60</math>, we know that if <math>n</math> is correct, then <math>n+63</math> is divisible by <math>60</math> but not <math>120</math>:
 +
<cmath>\frac{n + 63}{60} = \frac{1077}{60} = 17\text{ R }57.</cmath>
 +
Again, this does not work. This requires some guessing and checking. We can add <math>21</math> over and over again until <math>n</math> is valid. This changes <math>n</math> while also maintaining that <math>\frac{n + 120}{21}</math> has no remainders.
 +
After adding <math>21</math> once, we get <math>18 r 18</math>. By pure luck, adding <math>21</math> two more times gives us <math>19</math> with no remainders.
 +
We now have <math>1077 + 21 + 21 + 21 = 1140</math>. However, this number is divisible by <math>120</math>. To get the next possible number, we add the LCM of <math>21</math> and <math>60</math> (once again, to maintain divisibility), which is <math>420</math>. Unfortunately, <math>1140 + 420 = 1560</math> is still divisible by <math>120</math>. Adding <math>420</math> again gives us <math>1980</math>, which is valid. However, remember that this is equal to <math>n + 63</math>, so subtracting <math>63</math> from <math>1980</math> gives us <math>1917</math>, which is <math>n</math>.
 +
 
 +
The sum of its digits are <math>1 + 9 + 1 + 7 = \boxed{\textbf{(C) } 18}</math>.
 +
 
 +
~primegn
 +
 
 +
==Solution 8 (Euclidean Algorithm)==
 +
By the Euclidean Algorithm, we have
 +
<cmath>\begin{alignat*}{8}
 +
\gcd(63,n+120)&=\hspace{1mm}&&\gcd(63,\phantom{ }\underbrace{n+120-63k_1}_{(n+120) \ \mathrm{mod} \ 63}\phantom{ })&&=21, \\
 +
\gcd(n+63,120)&=&&\gcd(\phantom{ }\underbrace{n+63-120k_2}_{(n+63) \ \mathrm{mod} \ 120}\phantom{ },120)&&=60.
 +
\end{alignat*}</cmath>
 +
Clearly, <math>n+120-63k_1</math> must be either <math>21</math> or <math>42,</math> and <math>n+63-120k_2</math> must be <math>60.</math>
 +
 
 +
More generally, let <math>t\in\{1,2\},</math> so we get
 +
<cmath>\begin{align*}
 +
n+120-63k_1&=21t, &\hspace{55.5mm}(1) \\
 +
n+63-120k_2&=60. &\hspace{55.5mm}(2)
 +
\end{align*}</cmath>
 +
Subtracting <math>(2)</math> from <math>(1)</math> and then simplifying give
 +
<cmath>\begin{align*}
 +
57-63k_1+120k_2&=21t-60 \\
 +
117-63k_1+120k_2&=21t \\
 +
39-21k_1+40k_2&=7t. \hspace{54mm}(\bigstar)
 +
\end{align*}</cmath>
 +
Taking <math>(\bigstar)</math> modulo <math>7</math> produces
 +
<cmath>\begin{align*}
 +
4+5k_2&\equiv0\pmod{7} \\
 +
k_2&\equiv2\pmod{7}.
 +
\end{align*}</cmath>
 +
Recall that <math>n>1000.</math> From <math>(2),</math> it follows that <cmath>1063-120k_2<n+63-120k_2=60,</cmath> from which <math>k_2>8.</math> Therefore, the possible values for <math>k_2</math> are <math>9,16,23,\ldots.</math>
 +
 
 +
We need to check whether positive integers <math>k_1</math> and <math>t</math> (where <math>t\in\{1,2\}</math>) exist in <math>(1):</math>
 +
<ul style="margin-left: 1.5em, list-style-type: square;">
 +
  <li>If <math>k_2=9,</math> then substituting into <math>(2)</math> gives <math>n=1077.</math> Next, substituting into <math>(1)</math> produces <math>1197-63k_1=21t,</math> or <math>57-3k_1=t.</math> <p>
 +
There are no solutions <math>(k_1,t).</math></li><p>
 +
  <li>If <math>k_2=16,</math> then substituting into <math>(2)</math> gives <math>n=1917.</math> Next, substituting into <math>(1)</math> produces <math>2037-63k_1=21t,</math> or <math>97-3k_1=t.</math> <p>
 +
The solution is <math>(k_1,t)=(32,1).</math></li><p>
 +
</ul>
 +
Finally, the least such positive integer <math>n</math> is <math>1917.</math> The sum of its digits is <math>1+9+1+7=\boxed{\textbf{(C) } 18}.</math>
 +
 
 +
~MRENTHUSIASM
 +
 
 +
== Solution 9 (Euclidean Algorithm) ==
 +
 
 +
Because we are finding value of <math>n</math> for <math>n > 1000</math>, let <math>n = 1000 + k</math>.
 +
 
 +
Using the Euclidean Algorithm,
 +
<cmath>\begin{align*}
 +
\gcd(63, n+120) &= \gcd(63, 1000 + k + 120) \\
 +
&= \gcd(63, k + 1120 - 63 \cdot 18) \\
 +
&= \gcd(63, k-14) \\
 +
&= 21, \\
 +
\gcd(n+63, 120) &= \gcd(k + 1000 + 63, 120) \\
 +
&= \gcd(k + 1000 + 63 - 120 \cdot 9, 120) \\
 +
&= \gcd(k-17, 120) \\
 +
&= 60.
 +
\end{align*}</cmath>
 +
So, we have
 +
<cmath>\begin{align*}
 +
k &\equiv 14 \pmod{21}, \\
 +
k &\equiv 17 \pmod{60}.
 +
\end{align*}</cmath>
 +
Let <math>k = 21p + 14 = 60q + 17</math>, <math>7p= 20q + 1</math> (by the Division Algorithm), <math>7p = 21q - (q - 1)</math>, <math>q - 1</math> is a multiple of <math>7</math>.
 +
 
 +
Let <math>q-1 = 7r</math>, <math>q = 7r+1</math>, <math>k = 60(7r+1) + 17 = 420r + 77</math>.
 +
 
 +
<math>n = 1000 + k = 420r + 1077</math>, <math>n = 1077, 1497, 1917</math>.
 +
 
 +
By substituting <math>1077</math>, <math>1497</math>, <math>1917</math> into <math>\gcd(63, n+120) =21</math> and <math>\gcd(n+63, 120)=60</math>, <math>1077</math> and  <math>1497</math> aren't valid answers, only <math>1917</math> is. Therefore, the answer is <math>1+9+1+7=\boxed{\textbf{(C) } 18}</math>.
 +
 
 +
~[https://artofproblemsolving.com/wiki/index.php/User:Isabelchen isabelchen] (Solution)
 +
 
 +
~[https://artofproblemsolving.com/wiki/index.php/User:Plainoldnumbertheory Plainoldnumbertheory] (Minor Edits)
 +
 
 +
~[https://artofproblemsolving.com/wiki/index.php/User:Plainoldnumbertheory Puck_0] (Formatting)
 +
 
 +
== Solution 10 (Diophantine Equations)==
 +
 
 +
We know <math>63 = 3 \cdot 21</math>, and <math>\gcd(63, n + 120) = 21 \Longrightarrow n + 120 = 21a</math>, where <math>a</math> is not a multiple of <math>3</math>.
 +
 
 +
Also, <math>120 = 2 \cdot 60</math>, and <math>gcd(n+63, 120) = 60 \Longrightarrow n + 63 = 60b</math>, where <math>b</math> is not a multiple of <math>2</math>.
 +
 
 +
Let <math>n+63 = 60b = x</math>, <math>n = x - 63</math>, <math>n+120 = x+57 = 21a</math>.
 +
 
 +
Now the problem becomes <math>\gcd(63, x+57) =21</math> and <math>\gcd(x, 120)=60</math>.
 +
 
 +
Meaning <math>x + 57</math> has to be a multiple of <math>21</math> but not <math>63</math>, and <math>x</math> is a multiple of <math>60</math> but not <math>120</math>.
 +
 
 +
Using trial and error, the least values are <math>x = 33\cdot60 = 1980</math> and <math>n = x-63 = 1917</math>.
 +
 
 +
Therefore, the answer is <math>1+9+1+7=\boxed{\textbf{(C) } 18}</math>.
 +
 
 +
~[https://artofproblemsolving.com/wiki/index.php/User:Isabelchen isabelchen]
 +
 
 +
== Solution 11 (Chinese Remainder Theorem) ==
 +
We have
 +
<cmath>\begin{align*}
 +
\gcd(63, n+120) &= 21 \Longrightarrow n + 120 \equiv 0 \pmod{21}, \text{ where } 9 \nmid n + 120, \\
 +
\gcd(n+63, 120) &= 60 \Longrightarrow n + 63 \equiv 0 \pmod{60}, \text{ where } 8 \nmid n + 63.
 +
\end{align*}</cmath>
 +
So, we conclude that <math>n \equiv 6 \pmod{21}</math> and <math>n \equiv 57 \pmod{60}</math>, respectively.
 +
 
 +
Because the <math>2</math> moduli <math>21</math> and <math>60</math> are not relatively prime, namely <math>\gcd{(21, 60)} = 3</math>, <math>21 = 3 \cdot 7</math>, and <math>60 = 3 \cdot 20</math>, we convert the system of <math>2</math> linear congruences with non-coprime moduli into a system of <math>3</math> linear congruences with coprime moduli:
 +
<cmath>\begin{align*}
 +
n &\equiv 0 \pmod{3}, \\
 +
n &\equiv 6 \pmod{7}, \\
 +
n &\equiv 17 \pmod{20}.
 +
\end{align*}</cmath>
 +
By [https://artofproblemsolving.com/wiki/index.php/Chinese_Remainder_Theorem Chinese Remainder Theorem], the general solution of system of <math>3</math> linear congruences is <cmath>n = 420k + 1077.</cmath>
 +
We construct the following table:
 +
<cmath>\begin{array}{c|c|c|c}
 +
n & 1077 & 1497 & 1917\\
 +
\hline
 +
n + 120 & 1197 & 1617 & 2037\\
 +
\hline
 +
n + 63 & 1140 & 1560 & 1980\\
 +
\end{array}</cmath>
 +
Only <math>n = 1917</math> satisfies <math>9 \nmid n + 120</math> and <math>8 \nmid n + 63</math>. Therefore, the answer is <math>1+9+1+7=\boxed{\textbf{(C) } 18}</math>.
 +
 
 +
~[https://artofproblemsolving.com/wiki/index.php/User:Isabelchen isabelchen]
 +
 
 +
== Solution 12 (Logically Bashing) ==
 +
We know that <math>n</math> ends with the number <math>7</math>, since <math>n+63</math> is divisible by <math>60</math>, and any number divisible by <math>10</math> (a factor of <math>60</math>) must end with a <math>0</math>. As a result, <math>n+120</math> must also end in <math>7</math>. Because <math>n+63</math> must be divisible by <math>20</math>, as well (using the same gcd), the tens value of <math>n</math> must be odd. Also, <math>n+120</math> cannot be divisible by <math>9</math>, otherwise, its gcd with <math>63</math> will be <math>63</math>, instead of <math>21</math>.
 +
 
 +
Now, we can start bashing, using the <math>\gcd(63, n+120) =21</math>. We are given that <math>n</math> must be greater than <math>1000</math>, so we can try <math>n+120</math> that is greater than <math>1120</math>.
 +
 
 +
We try <math>21 \cdot 67</math>, but it has an even tens digit. We then can try the next highest, using <math>77</math>, but the <math>\gcd(n+63, 120) =120</math>, instead of <math>60</math>.
 +
 
 +
Since <math>87</math> is divisible by <math>3</math>, so when multiplied by <math>21</math>, it will be divisible by <math>9</math>, we do not have to test it.
 +
 
 +
The next biggest is <math>97</math>, which works and gives us <math>n=1917</math>, which, when the digits are added up, equals <math>\boxed{\textbf{(C) } 18}</math>.
 +
 
 +
~parmani
 +
 
 +
==Video Solutions==
 +
===Video Solution 1 (Richard Rusczyk)===
 +
https://www.youtube.com/watch?v=tk3yOGG2K-s&
 +
 
 +
===Video Solution 2===
 +
https://youtu.be/8mNMKH0T9W0 - Happytwin
 +
 
 +
===Video Solution 3 (Quick & Simple)===
 +
https://youtu.be/e5BJKMEIPEM
 +
 
 +
Education The Study of Everything
 +
 
 +
===Video Solution 4===
 +
https://www.youtube.com/watch?v=gdGmSyzR908&list=PLLCzevlMcsWNcTZEaxHe8VaccrhubDOlQ&index=5 ~ MathEx
 +
 
 +
===Video Solution 5===
 +
https://youtu.be/R220vbM_my8?t=899 ~ amritvignesh0719062.0
 +
 
 +
==Video Solution 6==
 +
https://youtu.be/YcXsdSKVywk
 +
 
 +
~savannahsolver
  
 
==See Also==
 
==See Also==
  
 
{{AMC10 box|year=2020|ab=A|num-b=23|num-a=25}}
 
{{AMC10 box|year=2020|ab=A|num-b=23|num-a=25}}
 +
 +
[[Category:Introductory Number Theory Problems]]
 
{{MAA Notice}}
 
{{MAA Notice}}

Latest revision as of 18:33, 31 August 2024

Problem

Let $n$ be the least positive integer greater than $1000$ for which

\[\gcd(63, n+120) =21\quad \text{and} \quad \gcd(n+63, 120)=60.\]

What is the sum of the digits of $n$?

$\textbf{(A) } 12 \qquad\textbf{(B) } 15 \qquad\textbf{(C) } 18 \qquad\textbf{(D) } 21\qquad\textbf{(E) } 24$

Solution 1

We know that $\gcd(n+57,63)=21$ and $\gcd(n-57, 120)= 60$ by the Euclidean Algorithm. Hence, let $n+57=21\alpha$ and $n-57=60 \gamma$, where $\gcd(\alpha,3)=1$ and $\gcd(\gamma,2)=1$. Subtracting the two equations, $38=7\alpha-20\gamma$. Letting $\gamma = 2s+1$, we get $58=7\alpha-40s$. Taking modulo $40$, we have $\alpha \equiv{14} \pmod{40}$. We are given that $n=21\alpha -57 >1000$, so $\alpha \geq 51$. Notice that if $\alpha =54$ then the condition $\gcd(\alpha,3)=1$ is violated. The next possible value of $\alpha = 94$ satisfies the given condition, giving us $n=1917$.

Alternatively, we could have said $\alpha = 40k+14 \equiv{0} \pmod{3}$ for $k \equiv{1} \pmod{3}$ only, so $k \equiv{0,2} \pmod{3}$, giving us our answer. Since the problem asks for the sum of the digits of $n$, our answer is $1+9+1+7=\boxed{\textbf{(C) } 18}$.

~Prabh1512

Solution 2

The conditions of the problem reduce to the following: $n+120 = 21k$ and $n+63 = 60\ell$, where $\gcd(k,3) = 1$ and $\gcd(\ell,2) = 1$. From these equations, we see that $21k - 60\ell = 57$. Solving this Diophantine equation gives us that $k = 20a + 17$ and $\ell = 7a + 5$. Since, $n>1000$, we can do some bounding and get that $k > 53$ and $\ell > 17$. Now we start bashing by plugging in numbers that satisfy these conditions: $a=4$ is the first number that works so we get $\ell = 33$, $k = 97$. Therefore, we have $n=21(97)-120=60(33)-63=1917$, and our answer is $1+9+1+7=\boxed{\textbf{(C) } 18}$.

Solution 3

We first find that $n\equiv6\pmod{21}$ and $n\equiv57\pmod{60}$, then we get $n=21x+6$ and $n=60y+57$ by definitions, where $x$ and $y$ are integers. It follows that $y$ must be odd, since the GCD will be $120$ instead of $60$ if $y$ is even. Also, the unit digit of $n$ must be $7$, since the unit digit of $60y$ is always $0$ and the unit digit of $57$ is $7$. Therefore, we find that $x$ must end in $1$ to satisfy $n$ having a unit digit of $7$. Also, we find that $x$ must not be a multiple of $3$ or else the GCD will be $63$. Therefore, we test values for $x$ and find that $x=91$ satisfies all these conditions. Therefore, $n=1917$ and $1+9+1+7 = \boxed{\textbf{(C) } 18}$.

~happykeeper

Solution 4

We are given that $\gcd(63, n+120) =21$ and $\gcd(n+63, 120)=60.$ By applying the Euclidean algorithm in reverse, we have \[\gcd(63, n+120) = \gcd(63, n+120 + 63) = \gcd(63, n+183) = 21\] and \[\gcd(n+63, 120) = \gcd(n+63 + 120, 120) = \gcd(n+183, 120) = 60.\]

We now know that $n+183$ must be divisible by $21$ and $60,$ so it is divisible by $\text{lcm}(21, 60) = 420.$ Therefore, $n+183 = 420k$ for some integer $k.$ We know that $3 \nmid k,$ or else the first condition won't hold ($\gcd$ will be $63$) and $2 \nmid k,$ or else the second condition won't hold ($\gcd$ will be $120$). Since $k = 1$ gives us too small of an answer, then $k=5,$ from which $n = 1917.$ So, the answer is $1+9+1+7 = \boxed{\textbf{(C) } 18}.$

Solution 5

$\gcd(n+63,120)=60$ tells us $n+63\equiv60\pmod {120}$. The smallest $n+63$ that satisfies the previous condition and $n>1000$ is $1140$, so we start from there. If $n+63=1140$, then $n+120=1197$. Because $\gcd(n+120,63)=21$, $n+120\equiv21\pmod {63}$ or $n+120\equiv42\pmod {63}$. We see that $1197\equiv0\pmod {63}$, which does not fulfill the requirement for $n+120$, so we continue by keep on adding $120$ to $1197$, in order to also fulfill the requirement for $n+63$. Soon, we see that $n+120\pmod {63}$ decreases by $6$ every time we add $120$, so we can quickly see that $n=1917$ because at that point $n+120\equiv21\pmod {63}$. We add up all digits of $1917$ to get $\boxed{\textbf{(C) } 18}$.

~SmileKat32

Solution 6

We are able to set up the following system of congruences: \begin{align*} n &\equiv 6 \pmod {21}, \\ n &\equiv 57 \pmod {60}. \end{align*} Therefore, by definition, we are able to set-up the following system of equations: \begin{align*} n &= 21a + 6, \\ n &= 60b + 57. \end{align*} Thus, we have $21a + 6 = 60b + 57,$ from which \[7a + 2 = 20b + 19.\] We know $7a \equiv 0 \pmod {7},$ and since $7a = 20b + 17,$ therefore $20b + 17 \equiv 0 \pmod{7}.$ Simplifying this congruence further, we have \[b\equiv 3 \pmod{7}.\] Thus, by definition, $b = 7x + 3.$ Substituting this back into our original equation, we get \[n = 60(7x + 3) + 57 = 420x + 237.\] By definition, we are able to set up the following congruence: \[n \equiv 237 \pmod{420}.\] Thus, $n = 1917$, so our answer is simply $1+9+1+7=\boxed{\textbf{(C) } 18}$.

Remark

Since $n \equiv -120 \pmod{21},$ we conclude that $n \equiv 6 \pmod{21}.$

Since $n \equiv -63 \pmod{60},$ we conclude that $n \equiv 57 \pmod{60}.$

Remember that $b \equiv 3 \pmod{7}.$

Lastly, the reason why $n \neq 1077$ is $n + 120$ would be divisible by $63$, which is not possible due to the certain condition.

~nikenissan ~Midnight

Solution 7

First, we find $n$. We know that it is greater than $1000$, so we first input $n = 1000$. From the first equation, $\gcd(63, n + 120) = 21$, we know that if $n$ is correct, after we add $120$ to it, it should be divisible by $21$, but not $63$: \[\frac{n + 120}{21} = \frac{1120}{21} = 53\text{ R }7.\] This does not work. To get to the nearest number divisible by $21$, we have to add $14$ to cancel out the remainder. (Note that we don't subtract $7$ to get to $53$; $n$ is already at its lowest possible value!) Adding $14$ to $1000$ gives us $n = 1014$. (Note: $n$ is currently divisible by 63, but that's fine since we'll be changing it in the next step.)

Now using the second equation, $\gcd(n + 63, 120) = 60$, we know that if $n$ is correct, then $n+63$ is divisible by $60$ but not $120$: \[\frac{n + 63}{60} = \frac{1077}{60} = 17\text{ R }57.\] Again, this does not work. This requires some guessing and checking. We can add $21$ over and over again until $n$ is valid. This changes $n$ while also maintaining that $\frac{n + 120}{21}$ has no remainders. After adding $21$ once, we get $18 r 18$. By pure luck, adding $21$ two more times gives us $19$ with no remainders. We now have $1077 + 21 + 21 + 21 = 1140$. However, this number is divisible by $120$. To get the next possible number, we add the LCM of $21$ and $60$ (once again, to maintain divisibility), which is $420$. Unfortunately, $1140 + 420 = 1560$ is still divisible by $120$. Adding $420$ again gives us $1980$, which is valid. However, remember that this is equal to $n + 63$, so subtracting $63$ from $1980$ gives us $1917$, which is $n$.

The sum of its digits are $1 + 9 + 1 + 7 = \boxed{\textbf{(C) } 18}$.

~primegn

Solution 8 (Euclidean Algorithm)

By the Euclidean Algorithm, we have \begin{alignat*}{8} \gcd(63,n+120)&=\hspace{1mm}&&\gcd(63,\phantom{ }\underbrace{n+120-63k_1}_{(n+120) \ \mathrm{mod} \ 63}\phantom{ })&&=21, \\  \gcd(n+63,120)&=&&\gcd(\phantom{ }\underbrace{n+63-120k_2}_{(n+63) \ \mathrm{mod} \ 120}\phantom{ },120)&&=60.  \end{alignat*} Clearly, $n+120-63k_1$ must be either $21$ or $42,$ and $n+63-120k_2$ must be $60.$

More generally, let $t\in\{1,2\},$ so we get \begin{align*} n+120-63k_1&=21t, &\hspace{55.5mm}(1) \\ n+63-120k_2&=60. &\hspace{55.5mm}(2) \end{align*} Subtracting $(2)$ from $(1)$ and then simplifying give \begin{align*} 57-63k_1+120k_2&=21t-60 \\ 117-63k_1+120k_2&=21t \\ 39-21k_1+40k_2&=7t. \hspace{54mm}(\bigstar) \end{align*} Taking $(\bigstar)$ modulo $7$ produces \begin{align*} 4+5k_2&\equiv0\pmod{7} \\ k_2&\equiv2\pmod{7}. \end{align*} Recall that $n>1000.$ From $(2),$ it follows that \[1063-120k_2<n+63-120k_2=60,\] from which $k_2>8.$ Therefore, the possible values for $k_2$ are $9,16,23,\ldots.$

We need to check whether positive integers $k_1$ and $t$ (where $t\in\{1,2\}$) exist in $(1):$

  • If $k_2=9,$ then substituting into $(2)$ gives $n=1077.$ Next, substituting into $(1)$ produces $1197-63k_1=21t,$ or $57-3k_1=t.$

    There are no solutions $(k_1,t).$

  • If $k_2=16,$ then substituting into $(2)$ gives $n=1917.$ Next, substituting into $(1)$ produces $2037-63k_1=21t,$ or $97-3k_1=t.$

    The solution is $(k_1,t)=(32,1).$

Finally, the least such positive integer $n$ is $1917.$ The sum of its digits is $1+9+1+7=\boxed{\textbf{(C) } 18}.$

~MRENTHUSIASM

Solution 9 (Euclidean Algorithm)

Because we are finding value of $n$ for $n > 1000$, let $n = 1000 + k$.

Using the Euclidean Algorithm, \begin{align*} \gcd(63, n+120) &= \gcd(63, 1000 + k + 120) \\ &= \gcd(63, k + 1120 - 63 \cdot 18) \\ &= \gcd(63, k-14) \\ &= 21, \\ \gcd(n+63, 120) &= \gcd(k + 1000 + 63, 120) \\ &= \gcd(k + 1000 + 63 - 120 \cdot 9, 120) \\ &= \gcd(k-17, 120) \\ &= 60. \end{align*} So, we have \begin{align*} k &\equiv 14 \pmod{21}, \\ k &\equiv 17 \pmod{60}. \end{align*} Let $k = 21p + 14 = 60q + 17$, $7p= 20q + 1$ (by the Division Algorithm), $7p = 21q - (q - 1)$, $q - 1$ is a multiple of $7$.

Let $q-1 = 7r$, $q = 7r+1$, $k = 60(7r+1) + 17 = 420r + 77$.

$n = 1000 + k = 420r + 1077$, $n = 1077, 1497, 1917$.

By substituting $1077$, $1497$, $1917$ into $\gcd(63, n+120) =21$ and $\gcd(n+63, 120)=60$, $1077$ and $1497$ aren't valid answers, only $1917$ is. Therefore, the answer is $1+9+1+7=\boxed{\textbf{(C) } 18}$.

~isabelchen (Solution)

~Plainoldnumbertheory (Minor Edits)

~Puck_0 (Formatting)

Solution 10 (Diophantine Equations)

We know $63 = 3 \cdot 21$, and $\gcd(63, n + 120) = 21 \Longrightarrow n + 120 = 21a$, where $a$ is not a multiple of $3$.

Also, $120 = 2 \cdot 60$, and $gcd(n+63, 120) = 60 \Longrightarrow n + 63 = 60b$, where $b$ is not a multiple of $2$.

Let $n+63 = 60b = x$, $n = x - 63$, $n+120 = x+57 = 21a$.

Now the problem becomes $\gcd(63, x+57) =21$ and $\gcd(x, 120)=60$.

Meaning $x + 57$ has to be a multiple of $21$ but not $63$, and $x$ is a multiple of $60$ but not $120$.

Using trial and error, the least values are $x = 33\cdot60 = 1980$ and $n = x-63 = 1917$.

Therefore, the answer is $1+9+1+7=\boxed{\textbf{(C) } 18}$.

~isabelchen

Solution 11 (Chinese Remainder Theorem)

We have \begin{align*} \gcd(63, n+120) &= 21 \Longrightarrow n + 120 \equiv 0 \pmod{21}, \text{ where } 9 \nmid n + 120, \\ \gcd(n+63, 120) &= 60 \Longrightarrow n + 63 \equiv 0 \pmod{60}, \text{ where } 8 \nmid n + 63. \end{align*} So, we conclude that $n \equiv 6 \pmod{21}$ and $n \equiv 57 \pmod{60}$, respectively.

Because the $2$ moduli $21$ and $60$ are not relatively prime, namely $\gcd{(21, 60)} = 3$, $21 = 3 \cdot 7$, and $60 = 3 \cdot 20$, we convert the system of $2$ linear congruences with non-coprime moduli into a system of $3$ linear congruences with coprime moduli: \begin{align*} n &\equiv 0 \pmod{3}, \\ n &\equiv 6 \pmod{7}, \\ n &\equiv 17 \pmod{20}. \end{align*} By Chinese Remainder Theorem, the general solution of system of $3$ linear congruences is \[n = 420k + 1077.\] We construct the following table: \[\begin{array}{c|c|c|c} n & 1077 & 1497 & 1917\\ \hline n + 120 & 1197 & 1617 & 2037\\ \hline n + 63 & 1140 & 1560 & 1980\\ \end{array}\] Only $n = 1917$ satisfies $9 \nmid n + 120$ and $8 \nmid n + 63$. Therefore, the answer is $1+9+1+7=\boxed{\textbf{(C) } 18}$.

~isabelchen

Solution 12 (Logically Bashing)

We know that $n$ ends with the number $7$, since $n+63$ is divisible by $60$, and any number divisible by $10$ (a factor of $60$) must end with a $0$. As a result, $n+120$ must also end in $7$. Because $n+63$ must be divisible by $20$, as well (using the same gcd), the tens value of $n$ must be odd. Also, $n+120$ cannot be divisible by $9$, otherwise, its gcd with $63$ will be $63$, instead of $21$.

Now, we can start bashing, using the $\gcd(63, n+120) =21$. We are given that $n$ must be greater than $1000$, so we can try $n+120$ that is greater than $1120$.

We try $21 \cdot 67$, but it has an even tens digit. We then can try the next highest, using $77$, but the $\gcd(n+63, 120) =120$, instead of $60$.

Since $87$ is divisible by $3$, so when multiplied by $21$, it will be divisible by $9$, we do not have to test it.

The next biggest is $97$, which works and gives us $n=1917$, which, when the digits are added up, equals $\boxed{\textbf{(C) } 18}$.

~parmani

Video Solutions

Video Solution 1 (Richard Rusczyk)

https://www.youtube.com/watch?v=tk3yOGG2K-s&

Video Solution 2

https://youtu.be/8mNMKH0T9W0 - Happytwin

Video Solution 3 (Quick & Simple)

https://youtu.be/e5BJKMEIPEM

Education The Study of Everything

Video Solution 4

https://www.youtube.com/watch?v=gdGmSyzR908&list=PLLCzevlMcsWNcTZEaxHe8VaccrhubDOlQ&index=5 ~ MathEx

Video Solution 5

https://youtu.be/R220vbM_my8?t=899 ~ amritvignesh0719062.0

Video Solution 6

https://youtu.be/YcXsdSKVywk

~savannahsolver

See Also

2020 AMC 10A (ProblemsAnswer KeyResources)
Preceded by
Problem 23
Followed by
Problem 25
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
All AMC 10 Problems and Solutions

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. AMC logo.png