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

m (Solution (Detailed Explanation of Solution 1))
m (Solution (Detailed Explanation of Solution 1))
Line 76: Line 76:
 
4 & 16 & 1 \\
 
4 & 16 & 1 \\
 
\end{array}</cmath>
 
\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 ... options and <math>n</math> has ... options. Therefore, this case has ... ordered pairs.</li><p>
 +
  <li>If <math>m</math> has <math>1</math> factor of <math>2,</math> then <math>m</math> has ... options and <math>n</math> has ... options. Therefore, this case has ... ordered pairs.</li><p>
 +
  <li>If <math>m</math> has <math>2</math> factors of <math>2,</math> then <math>m</math> has ... options and <math>n</math> has ... options. Therefore, this case has ... ordered pairs.</li><p>
 +
  <li>If <math>m</math> has <math>3</math> factors of <math>2,</math> then <math>m</math> has ... options and <math>n</math> has ... options. Therefore, this case has ... ordered pairs.</li>
 +
</ol>
 +
Together, there are ... ordered pairs.
  
 
<b>Solution in progress. A million thanks for not editing.</b>
 
<b>Solution in progress. A million thanks for not editing.</b>

Revision as of 08:33, 1 April 2021

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

We make use of the (olympiad number theory) lemma that $\gcd(2^a-1,2^b-1)=2^{\gcd(a,b)}-1$.

Noting $\gcd(2^m+1,2^m-1)=\gcd(2^m+1,2)=1$, we have (by difference of squares)\[\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)\]\[\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).\] It is now easy to calculate the answer (with casework on $\nu_2(m)$) as $15 \cdot 15+8 \cdot 7+4 \cdot 3+2 \cdot 1=\boxed{295}$.

~Lcz

Solution 2 (Generalized and Comprehensive)

Claim (Solution 1's Lemma)

If $u,a,$ and $b$ are positive integers with $u\geq2,$ then $\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

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. Note that for all integers $p>q>0,$ the Euclidean Algorithm states that \[\gcd(p,q)=\gcd(p-q,q)=\cdots=\gcd(q,p\text{ mod }q).\] We apply this result repeatedly to reduce the larger number: \[\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).\] Continuing, we have \begin{align*} \gcd\left(u^a-1,u^b-1\right)&=\cdots \\ &=\gcd\left(u^b-1,u^{a-b}-1\right) \\ &=\cdots \\ &=\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

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$ for which $ax+by=\gcd(a,b),$ thus \[u^{\gcd(a,b)}=u^{ax+by}=\left(u^a\right)^x\left(u^b\right)^y\equiv1\pmod{d},\] from which $u^{\gcd(a,b)}-1\equiv0\pmod{d}.$ We know that $u^{\gcd(a,b)}-1\geq d.$

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

Solution (Detailed Explanation of Solution 1)

By the Euclidean Algorithm, we have \[\gcd\left(2^m+1,2^m-1\right)=\gcd\left(2^m-1,2\right)=1. \hspace{40mm} (*)\] 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) \hspace{4.1mm} (**) \\ \underbrace{\gcd\left(\left(2^m+1\right)\left(2^m-1\right),2^n-1\right)}_{\text{by }(*)\text{ and }\textbf{Remark (GCD Fact)}}&>\gcd\left(2^m-1,2^n-1\right) \\ \gcd\left(2^{2m}-1,2^n-1\right)&>\gcd\left(2^m-1,2^n-1\right) \\ \underbrace{2^{\gcd(2m,n)}-1}_{\text{by }\textbf{Claim}}&>\underbrace{2^{\gcd(m,n)}-1}_{\text{by }\textbf{Claim}} \\ \gcd(2m,n)&>\gcd(m,n), \end{align*} which implies that $n$ has 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] \textbf{\# of Factors of }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 ... options and $n$ has ... options. Therefore, this case has ... ordered pairs.
  2. If $m$ has $1$ factor of $2,$ then $m$ has ... options and $n$ has ... options. Therefore, this case has ... ordered pairs.
  3. If $m$ has $2$ factors of $2,$ then $m$ has ... options and $n$ has ... options. Therefore, this case has ... ordered pairs.
  4. If $m$ has $3$ factors of $2,$ then $m$ has ... options and $n$ has ... options. Therefore, this case has ... ordered pairs.

Together, there are ... ordered pairs.

Solution in progress. A million thanks for not editing.

~MRENTHUSIASM

Remark (GCD Fact)

In $(**)$ of the solution, we use the following fact:

For positive integers $r,s,$ and $t,$ if $\gcd(r,s)=1,$ then $\gcd(r,t)\cdot\gcd(s,t)=\gcd(rs,t).$

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

~MRENTHUSIASM

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