Difference between revisions of "2021 AIME II Problems/Problem 9"

(Solution (Detailed Explanation of Solution 1))
m (Solution 2)
 
(52 intermediate revisions by 4 users not shown)
Line 3: Line 3:
  
 
==Solution 1==
 
==Solution 1==
We make use of the (olympiad number theory) lemma that <math>\gcd(2^a-1,2^b-1)=2^{\gcd(a,b)}-1</math>.
+
This solution refers to the <b>Remarks</b> section.
  
Noting <math>\gcd(2^m+1,2^m-1)=\gcd(2^m+1,2)=1</math>, we have (by difference of squares)<cmath>\gcd(2^m+1,2^n-1) \neq 1 \iff \gcd(2^{2m}-1,2^n-1) \neq \gcd(2^m-1,2^n-1) </cmath><cmath>\iff 2^{\gcd(2m,n)}-1 \neq 2^{\gcd(m,n)}-1 \iff \gcd(2m,n) \neq \gcd(m,n) \iff \nu_2(m)<\nu_2(n).</cmath> It is now easy to calculate the answer (with casework on <math>\nu_2(m)</math>) as <math>15 \cdot 15+8 \cdot 7+4 \cdot 3+2 \cdot 1=\boxed{295}</math>.
+
By the Euclidean Algorithm, we have <cmath>\gcd\left(2^m+1,2^m-1\right)=\gcd\left(2,2^m-1\right)=1.</cmath>
 +
We are given that <math>\gcd\left(2^m+1,2^n-1\right)>1.</math> Multiplying both sides by <math>\gcd\left(2^m-1,2^n-1\right)</math> gives
 +
<cmath>\begin{align*}
 +
\gcd\left(2^m+1,2^n-1\right)\cdot\gcd\left(2^m-1,2^n-1\right)&>\gcd\left(2^m-1,2^n-1\right) \\
 +
\gcd\left(\left(2^m+1\right)\left(2^m-1\right),2^n-1\right)&>\gcd\left(2^m-1,2^n-1\right) \hspace{12mm} &&\text{by }\textbf{Claim 1} \\
 +
\gcd\left(2^{2m}-1,2^n-1\right)&>\gcd\left(2^m-1,2^n-1\right) \\
 +
2^{\gcd(2m,n)}-1&>2^{\gcd(m,n)}-1 &&\text{by }\textbf{Claim 2} \\
 +
\gcd(2m,n)&>\gcd(m,n),
 +
\end{align*}</cmath>
 +
which implies that <math>n</math> must have more factors of <math>2</math> than <math>m</math> does.
 +
 
 +
We construct the following table for the first <math>30</math> positive integers:
 +
<cmath>\begin{array}{c|c|c}
 +
&& \\ [-2.5ex]
 +
\boldsymbol{\#}\textbf{ of Factors of }\boldsymbol{2} & \textbf{Numbers} & \textbf{Count} \\
 +
\hline
 +
&& \\ [-2.25ex]
 +
0 & 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29 & 15 \\
 +
&& \\ [-2.25ex]
 +
1 & 2,6,10,14,18,22,26,30 & 8 \\
 +
&& \\ [-2.25ex]
 +
2 & 4,12,20,28 & 4 \\ 
 +
&& \\ [-2.25ex]
 +
3 & 8,24 & 2 \\
 +
&& \\ [-2.25ex]
 +
4 & 16 & 1 \\
 +
\end{array}</cmath>
 +
To count the ordered pairs <math>(m,n),</math> we perform casework on the number of factors of <math>2</math> that <math>m</math> has:
 +
<ol style="margin-left: 1.5em;">
 +
  <li>If <math>m</math> has <math>0</math> factors of <math>2,</math> then <math>m</math> has <math>15</math> options and <math>n</math> has <math>8+4+2+1=15</math> options. So, this case has <math>15\cdot15=225</math> ordered pairs.</li><p>
 +
  <li>If <math>m</math> has <math>1</math> factor of <math>2,</math> then <math>m</math> has <math>8</math> options and <math>n</math> has <math>4+2+1=7</math> options. So, this case has <math>8\cdot7=56</math> ordered pairs.</li><p>
 +
  <li>If <math>m</math> has <math>2</math> factors of <math>2,</math> then <math>m</math> has <math>4</math> options and <math>n</math> has <math>2+1=3</math> options. So, this case has <math>4\cdot3=12</math> ordered pairs.</li><p>
 +
  <li>If <math>m</math> has <math>3</math> factors of <math>2,</math> then <math>m</math> has <math>2</math> options and <math>n</math> has <math>1</math> option. So, this case has <math>2\cdot1=2</math> ordered pairs.</li>
 +
</ol>
 +
Together, the answer is <math>225+56+12+2=\boxed{295}.</math>
 +
 
 +
~Lcz ~MRENTHUSIASM
 +
 
 +
==Solution 2==
 +
 
 +
Consider any ordered pair <math>(m,n)</math> such that <math>\gcd(2^m+1, 2^n-1) > 1</math>. There must exist some odd number <math>p\ne 1</math> such that <math>2^m \equiv -1 \pmod{p}</math> and <math>2^n \equiv 1 \pmod{p}</math>. Let <math>d</math> be the order of <math>2</math> modulo <math>p</math>. Note that <math>2^{2m} \equiv 1 \pmod{p}</math>. From this, we can say that <math>2m</math> and <math>n</math> are both multiples of <math>d</math>, but <math>m</math> is not. Thus, we have <math>v_2(n) \ge v_2(d)</math> and <math>v_2(m) + 1 = v_2(d)</math>.  Substituting the latter equation into the inequality before gives <math>v_2(n) \ge v_2(m)+1</math>. Since <math>v_2(n)</math> and <math>v_2(m)</math> are integers, this implies <math>v_2(n)>v_2(m)</math>. The rest of the solution now proceeds as in Solution 1.
 +
 
 +
~Sedro
  
~Lcz
+
==Remarks==
  
==Solution 2 (Generalized and Comprehensive)==
+
===Claim 1 (GCD Property)===
===Claim (Solution 1's Lemma)===
+
<b>If <math>\boldsymbol{r,s,}</math> and <math>\boldsymbol{t}</math> are positive integers such that <math>\boldsymbol{\gcd(r,s)=1,}</math> then <math>\boldsymbol{\gcd(r,t)\cdot\gcd(s,t)=\gcd(rs,t).}</math></b>
If <math>u,a,</math> and <math>b</math> are positive integers with <math>u\geq2,</math> then <math>\gcd\left(u^a-1,u^b-1\right)=u^{\gcd(a,b)}-1.</math>
+
 
 +
As <math>r</math> and <math>s</math> are relatively prime (have no prime divisors in common), this property is intuitive.
 +
 
 +
~MRENTHUSIASM
 +
 
 +
===Claim 2 (Olympiad Number Theory Lemma)===
 +
<b>If <math>\boldsymbol{u,a,}</math> and <math>\boldsymbol{b}</math> are positive integers such that <math>\boldsymbol{u\geq2,}</math> then <math>\boldsymbol{\gcd\left(u^a-1,u^b-1\right)=u^{\gcd(a,b)}-1.}</math></b>
  
 
There are two proofs to this claim, as shown below.
 
There are two proofs to this claim, as shown below.
Line 17: Line 65:
 
~MRENTHUSIASM
 
~MRENTHUSIASM
  
===Proof 1 (Euclidean Algorithm)===
+
===Claim 2 Proof 1 (Euclidean Algorithm)===
 
If <math>a=b,</math> then <math>\gcd(a,b)=a=b,</math> from which the claim is clearly true.
 
If <math>a=b,</math> then <math>\gcd(a,b)=a=b,</math> from which the claim is clearly true.
  
Otherwise, let <math>a>b</math> without the loss of generality. Note that for all integers <math>p>q>0,</math> the Euclidean Algorithm states that <cmath>\gcd(p,q)=\gcd(p-q,q)=\cdots=\gcd(q,p\text{ mod }q).</cmath> We apply this result repeatedly to reduce the larger number: <cmath>\gcd\left(u^a-1,u^b-1\right)=\gcd\left(u^b-1,u^a-1-u^{a-b}\left(u^b-1\right)\right)=\gcd\left(u^b-1,u^{a-b}-1\right).</cmath>
+
Otherwise, let <math>a>b</math> without the loss of generality. For all integers <math>p</math> and <math>q</math> such that <math>p>q>0,</math> the Euclidean Algorithm states that <cmath>\gcd(p,q)=\gcd(p-q,q)=\cdots=\gcd(p\operatorname{mod}q,q).</cmath> We apply this result repeatedly to reduce the larger number: <cmath>\gcd\left(u^a-1,u^b-1\right)=\gcd\left(u^a-1-u^{a-b}\left(u^b-1\right),u^b-1\right)=\gcd\left(u^{a-b}-1,u^b-1\right).</cmath>
 
Continuing, we have
 
Continuing, we have
 
<cmath>\begin{align*}
 
<cmath>\begin{align*}
\gcd\left(u^a-1,u^b-1\right)&=\cdots \\
+
\gcd\left(u^a-1,u^b-1\right)&=\gcd\left(u^{a-b}-1,u^b-1\right) \\
&=\gcd\left(u^b-1,u^{a-b}-1\right) \\
+
& \ \vdots \\
&=\cdots \\
 
 
&=\gcd\left(u^{\gcd(a,b)}-1,u^{\gcd(a,b)}-1\right) \\
 
&=\gcd\left(u^{\gcd(a,b)}-1,u^{\gcd(a,b)}-1\right) \\
 
&=u^{\gcd(a,b)}-1,
 
&=u^{\gcd(a,b)}-1,
Line 33: Line 80:
 
~MRENTHUSIASM
 
~MRENTHUSIASM
  
===Proof 2 (Bézout's Identity)===
+
===Claim 2 Proof 2 (Bézout's Identity)===
 
Let <math>d=\gcd\left(u^a-1,u^b-1\right).</math> It follows that <math>u^a\equiv1\pmod{d}</math> and <math>u^b\equiv1\pmod{d}.</math>
 
Let <math>d=\gcd\left(u^a-1,u^b-1\right).</math> It follows that <math>u^a\equiv1\pmod{d}</math> and <math>u^b\equiv1\pmod{d}.</math>
  
By Bézout's Identity, there exist integers <math>x</math> and <math>y</math> for which <math>ax+by=\gcd(a,b),</math> thus <cmath>u^{\gcd(a,b)}=u^{ax+by}=\left(u^a\right)^x\left(u^b\right)^y\equiv1\pmod{d},</cmath>
+
By Bézout's Identity, there exist integers <math>x</math> and <math>y</math> such that <math>ax+by=\gcd(a,b),</math> so <cmath>u^{\gcd(a,b)}=u^{ax+by}=(u^a)^x\cdot(u^b)^y\equiv1\pmod{d},</cmath>
 
from which <math>u^{\gcd(a,b)}-1\equiv0\pmod{d}.</math> We know that <math>u^{\gcd(a,b)}-1\geq d.</math>
 
from which <math>u^{\gcd(a,b)}-1\equiv0\pmod{d}.</math> We know that <math>u^{\gcd(a,b)}-1\geq d.</math>
  
Notice that
+
Next, we notice that
 
<cmath>\begin{align*}
 
<cmath>\begin{align*}
 
u^a-1&=\left(u^{\gcd(a,b)}-1\right)\left(u^{a-\gcd{(a,b)}}+u^{a-2\gcd{(a,b)}}+u^{a-3\gcd{(a,b)}}+\cdots+1\right), \\
 
u^a-1&=\left(u^{\gcd(a,b)}-1\right)\left(u^{a-\gcd{(a,b)}}+u^{a-2\gcd{(a,b)}}+u^{a-3\gcd{(a,b)}}+\cdots+1\right), \\
Line 48: Line 95:
 
~MRENTHUSIASM
 
~MRENTHUSIASM
  
===Solution (Detailed Explanation of Solution 1)===
+
==Video Solution==
By the Euclidean Algorithm, we have <cmath>\gcd\left(2^m+1,2^m-1\right)=\gcd\left(2^m-1,2\right)=1.</cmath>
+
https://youtu.be/h3awf7yhGZ4
We are given that <math>\gcd\left(2^m+1,2^n-1\right)>1.</math> Multiplying both sides by <math>\gcd\left(2^m-1,2^n-1\right)</math> gives <cmath>\gcd\left(2^m+1,2^m-1\right)\cdot\gcd\left(2^m-1,2^n-1\right)>\gcd\left(2^m-1,2^n-1\right).</cmath>
 
  
<b>Solution in progress. A million thanks for not editing.</b>
+
~MathProblemSolvingSkills.com
  
~MRENTHUSIASM
 
  
===Remark (GCD Fact)===
+
==Video Solution by Interstigation==
In <math>(**)</math> of the solution, we use the following fact:
+
https://youtu.be/kasgsb0Rge4
  
For positive integers <math>r,s,</math> and <math>t,</math> if <math>\gcd(r,s)=1,</math> then <math>\gcd(r,t)\cdot\gcd(s,t)=\gcd(rs,t).</math>
+
~Interstigation
 
 
As <math>r</math> and <math>s</math> are relatively prime (have no prime factors in common), this fact is intuitive.
 
 
 
~MRENTHUSIASM
 
  
 
==See Also==
 
==See Also==
 
{{AIME box|year=2021|n=II|num-b=8|num-a=10}}
 
{{AIME box|year=2021|n=II|num-b=8|num-a=10}}
 
{{MAA Notice}}
 
{{MAA Notice}}

Latest revision as of 15:24, 13 February 2024

Problem

Find the number of ordered pairs $(m, n)$ such that $m$ and $n$ are positive integers in the set $\{1, 2, ..., 30\}$ and the greatest common divisor of $2^m + 1$ and $2^n - 1$ is not $1$.

Solution 1

This solution refers to the Remarks section.

By the Euclidean Algorithm, we have \[\gcd\left(2^m+1,2^m-1\right)=\gcd\left(2,2^m-1\right)=1.\] We are given that $\gcd\left(2^m+1,2^n-1\right)>1.$ Multiplying both sides by $\gcd\left(2^m-1,2^n-1\right)$ gives \begin{align*} \gcd\left(2^m+1,2^n-1\right)\cdot\gcd\left(2^m-1,2^n-1\right)&>\gcd\left(2^m-1,2^n-1\right) \\ \gcd\left(\left(2^m+1\right)\left(2^m-1\right),2^n-1\right)&>\gcd\left(2^m-1,2^n-1\right) \hspace{12mm} &&\text{by }\textbf{Claim 1} \\ \gcd\left(2^{2m}-1,2^n-1\right)&>\gcd\left(2^m-1,2^n-1\right) \\ 2^{\gcd(2m,n)}-1&>2^{\gcd(m,n)}-1 &&\text{by }\textbf{Claim 2} \\ \gcd(2m,n)&>\gcd(m,n), \end{align*} which implies that $n$ must have more factors of $2$ than $m$ does.

We construct the following table for the first $30$ positive integers: \[\begin{array}{c|c|c} && \\ [-2.5ex] \boldsymbol{\#}\textbf{ of Factors of }\boldsymbol{2} & \textbf{Numbers} & \textbf{Count} \\ \hline && \\ [-2.25ex]  0 & 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29 & 15 \\  && \\ [-2.25ex]  1 & 2,6,10,14,18,22,26,30 & 8 \\ && \\ [-2.25ex]  2 & 4,12,20,28 & 4 \\    && \\ [-2.25ex]  3 & 8,24 & 2 \\  && \\ [-2.25ex]  4 & 16 & 1 \\ \end{array}\] To count the ordered pairs $(m,n),$ we perform casework on the number of factors of $2$ that $m$ has:

  1. If $m$ has $0$ factors of $2,$ then $m$ has $15$ options and $n$ has $8+4+2+1=15$ options. So, this case has $15\cdot15=225$ ordered pairs.
  2. If $m$ has $1$ factor of $2,$ then $m$ has $8$ options and $n$ has $4+2+1=7$ options. So, this case has $8\cdot7=56$ ordered pairs.
  3. If $m$ has $2$ factors of $2,$ then $m$ has $4$ options and $n$ has $2+1=3$ options. So, this case has $4\cdot3=12$ ordered pairs.
  4. If $m$ has $3$ factors of $2,$ then $m$ has $2$ options and $n$ has $1$ option. So, this case has $2\cdot1=2$ ordered pairs.

Together, the answer is $225+56+12+2=\boxed{295}.$

~Lcz ~MRENTHUSIASM

Solution 2

Consider any ordered pair $(m,n)$ such that $\gcd(2^m+1, 2^n-1) > 1$. There must exist some odd number $p\ne 1$ such that $2^m \equiv -1 \pmod{p}$ and $2^n \equiv 1 \pmod{p}$. Let $d$ be the order of $2$ modulo $p$. Note that $2^{2m} \equiv 1 \pmod{p}$. From this, we can say that $2m$ and $n$ are both multiples of $d$, but $m$ is not. Thus, we have $v_2(n) \ge v_2(d)$ and $v_2(m) + 1 = v_2(d)$. Substituting the latter equation into the inequality before gives $v_2(n) \ge v_2(m)+1$. Since $v_2(n)$ and $v_2(m)$ are integers, this implies $v_2(n)>v_2(m)$. The rest of the solution now proceeds as in Solution 1.

~Sedro

Remarks

Claim 1 (GCD Property)

If $\boldsymbol{r,s,}$ and $\boldsymbol{t}$ are positive integers such that $\boldsymbol{\gcd(r,s)=1,}$ then $\boldsymbol{\gcd(r,t)\cdot\gcd(s,t)=\gcd(rs,t).}$

As $r$ and $s$ are relatively prime (have no prime divisors in common), this property is intuitive.

~MRENTHUSIASM

Claim 2 (Olympiad Number Theory Lemma)

If $\boldsymbol{u,a,}$ and $\boldsymbol{b}$ are positive integers such that $\boldsymbol{u\geq2,}$ then $\boldsymbol{\gcd\left(u^a-1,u^b-1\right)=u^{\gcd(a,b)}-1.}$

There are two proofs to this claim, as shown below.

~MRENTHUSIASM

Claim 2 Proof 1 (Euclidean Algorithm)

If $a=b,$ then $\gcd(a,b)=a=b,$ from which the claim is clearly true.

Otherwise, let $a>b$ without the loss of generality. For all integers $p$ and $q$ such that $p>q>0,$ the Euclidean Algorithm states that \[\gcd(p,q)=\gcd(p-q,q)=\cdots=\gcd(p\operatorname{mod}q,q).\] We apply this result repeatedly to reduce the larger number: \[\gcd\left(u^a-1,u^b-1\right)=\gcd\left(u^a-1-u^{a-b}\left(u^b-1\right),u^b-1\right)=\gcd\left(u^{a-b}-1,u^b-1\right).\] Continuing, we have \begin{align*} \gcd\left(u^a-1,u^b-1\right)&=\gcd\left(u^{a-b}-1,u^b-1\right) \\ & \ \vdots \\ &=\gcd\left(u^{\gcd(a,b)}-1,u^{\gcd(a,b)}-1\right) \\ &=u^{\gcd(a,b)}-1, \end{align*} from which the proof is complete.

~MRENTHUSIASM

Claim 2 Proof 2 (Bézout's Identity)

Let $d=\gcd\left(u^a-1,u^b-1\right).$ It follows that $u^a\equiv1\pmod{d}$ and $u^b\equiv1\pmod{d}.$

By Bézout's Identity, there exist integers $x$ and $y$ such that $ax+by=\gcd(a,b),$ so \[u^{\gcd(a,b)}=u^{ax+by}=(u^a)^x\cdot(u^b)^y\equiv1\pmod{d},\] from which $u^{\gcd(a,b)}-1\equiv0\pmod{d}.$ We know that $u^{\gcd(a,b)}-1\geq d.$

Next, we notice that \begin{align*} u^a-1&=\left(u^{\gcd(a,b)}-1\right)\left(u^{a-\gcd{(a,b)}}+u^{a-2\gcd{(a,b)}}+u^{a-3\gcd{(a,b)}}+\cdots+1\right), \\ u^b-1&=\left(u^{\gcd(a,b)}-1\right)\left(u^{b-\gcd{(a,b)}}+u^{b-2\gcd{(a,b)}}+u^{b-3\gcd{(a,b)}}+\cdots+1\right). \end{align*} Since $u^{\gcd(a,b)}-1$ is a common divisor of $u^a-1$ and $u^b-1,$ we conclude that $u^{\gcd(a,b)}-1=d,$ from which the proof is complete.

~MRENTHUSIASM

Video Solution

https://youtu.be/h3awf7yhGZ4

~MathProblemSolvingSkills.com


Video Solution by Interstigation

https://youtu.be/kasgsb0Rge4

~Interstigation

See Also

2021 AIME II (ProblemsAnswer KeyResources)
Preceded by
Problem 8
Followed by
Problem 10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
All AIME Problems and Solutions

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