4

Hints Only for 2011 AIME I Problem 11

Let $R$ be the set of all possible remainders when a number of the form $2^n$, $n$ a nonnegative integer, is divided by $1000$. Let $S$ be the sum of all elements in $R$. Find the remainder when $S$ is divided by $1000$.

$2^1 \equiv 2, 2^2 \equiv 4, 2^3 \equiv 8, 2^4 \equiv 16, 2^5 \equiv 32, 2^6 \equiv 64, 2^7 \equiv 128, 2^8 \equiv 256, 2^9 \equiv 512$.

I tried many values of $2^x$ to notice a pattern.

$2^{10} \equiv 24 \pmod{1000}$ and $2^{11} = 48 \pmod{1000}$ and this pattern continue until some point, but then stops.

I am not sure if $2^k \pmod{1000}$ ever cycles back.

But since computing $2^k \pmod{1000}$ is pretty quick I went ahead and found:

$2^{12} \equiv 96, 2^{13} \equiv 192, 2^{14} \equiv 184, 2^{15} \equiv 368, 2^{16} \equiv 736, 2^{17} \equiv 472, 2^{18} \equiv 944, 2^{19} \equiv 888, 2^{20} \equiv 776, 2^{21} \equiv 552, 2^{22} \equiv 104, 2^{23} \equiv 208, 2^{24} \equiv 416, 2^{25} \equiv 832, 2^{26} \equiv 664$.

And I see absolutely no recurring pattern. But I do realize it has to stop somewhere since it cant be an infinite sum.

like:

$$2^{4k + n} \equiv 2^{n} \pmod{10}$$

Hints Only

  • EDIT

using $a^{\phi(x)} \equiv 1 \pmod{x}$ from the hints given (as comments and answers)

$2^{100} \equiv 1 \pmod{125}$

so:

$2^{100k + n} \equiv 2^n \pmod{125}$

for $\pmod{8}$,

$2 \equiv 2, 2^2 \equiv 4, 2^3 \equiv 0, 2^4 \equiv 0.... \pmod{8}$

So I need:

$$\sum_{k=0}^{99} 2^n = 2^{100} - 1$$

$\sum \pmod{1000}$ is what I need to find:

I have the system:

$$2^{100} - 1 \equiv 0 \pmod{125}, 2^{100} - 1 \equiv 7 \pmod{8}$$

Now, I am in trouble, how to solve a congruence system? (Noob to CRT)

Edit: I am attempting to use CRT.

$125r + 8s = 1$ I need to find a $(r, s)$ ordered (integer) pair.

$r = \frac{1 - 8s}{125} \implies 1 - 8s \equiv 0 \pmod{125} \implies 8s \equiv 1 \pmod{125}$

I am not sure how to proceed.

Bill Dubuque
  • 282,220
Amad27
  • 11,551
  • @AndréNicolas Suppose we had $8(5)$ (yes taking a multiple of 5) $=40$. So what is exactly the problem with this? – Amad27 Jul 27 '15 at 13:02
  • $2^n$ can never be divisible by $5$, so it cannot be congruent to $5$ mod $125$, and therefore cannot be congruent to $40$ mod $1000$. Modulo $125$ it can be anything other than a multiple of $5$. The system does not like long strings of comments. I will delete most of mine and suggest you also do deleting. – André Nicolas Jul 27 '15 at 13:09
  • @AndréNicolas, done. Okay, that is an interesting method, I would like to know more please. So using your method. $2^{100k +n} \equiv 2^n \pmod{125}$ and $2^{n} \equiv 0 \pmod{8}$.

    What do you do after this layout?

    – Amad27 Jul 27 '15 at 13:25
  • For every $a$ relatively prime to $125$, the congruence $2^n \equiv a\pmod{125}$ has a solution, and therefore for every $b$ divisible by $8$ but not by $5$, the congruence $2^n\equiv b\pmod{1000}$ has a solution. For other $b$ there is no solution. Now note that $b$ is divisible by $8$ but not by $5$ iff $1000-b$ is divisible by $8$ but not by $5$. Now $b$ and $1000-b$ cancel modulo $1000$. It follows that the sum of the numbers between $1$ and $999$ that are congruent to some $2^n$ ($n\ge 3$) is divisible by $1000$. (Basically, a pairing argument.) – André Nicolas Jul 27 '15 at 13:56
  • @AndréNicolas, wow that is a very complicated solution at my level actually. Do you think you can assist me with summing the powers of $2$ method? That is easier for me? I mean:

    $2^{102} \equiv 4 \pmod{125}, \equiv 0 \pmod{8}$ hence, $\equiv 504 \pmod{1000}$ is a solution. How do we know if $504$ has ever appeared before or not? What about the powers later on?

    – Amad27 Jul 27 '15 at 14:11
  • The powers later on repeat. Since $2$ is a primitive root of $125$, the powers $2^3$ to $2^{102}$ are distinct modulo $125$, and hence modulo $1000$. With the powers of $2$ method, we are summing the geometric series $2^3$ to $2^{102}$. By the usual formula the sum is $S=\frac{2^3(2^{100}-1)}{2-1}$. Since $2^{100}\equiv 1\pmod{125}$, $S$ is divisible by $1000$, so has $0$ remainder. – André Nicolas Jul 27 '15 at 14:52
  • @AndréNicolas, Interesting. So suppose $x$ was a primitive root of $150$ what does this say about a cycle modulo $150$? – Amad27 Jul 27 '15 at 14:55
  • $150$ does not have a primitive root. – André Nicolas Jul 27 '15 at 14:56
  • Every introductory number theory book has it. You can also search, say starting with Wikipedia. Comments are not a useful place to describe the notion to someone who has not met it. – André Nicolas Jul 27 '15 at 15:01
  • Length $6=\varphi(7)$. – André Nicolas Jul 27 '15 at 15:04
  • Okay so a cycle of $6$? And then how would you determine for what $k$ $3^k$ does this cycle begin? – Amad27 Jul 27 '15 at 15:09
  • We can start anywhere. Traditional is $k=1$. – André Nicolas Jul 27 '15 at 15:14
  • @AndréNicolas So for $2$ and $125$ we had, a cycle -> $\varphi(125) = 100$. But this didnt start at $k=1$ – Amad27 Jul 27 '15 at 15:15
  • We can start the cycle for $125$ anywhere we like, such as $1$. But modulo $1000$ things are different, because $0,1,2$ are special modulo $8$. Starting at any $k\ge 3$ will work modulo $1000$. – André Nicolas Jul 27 '15 at 15:21

3 Answers3

4

If $2^i\equiv 2^j\pmod{1000}$, then $2^i\equiv 2^j\pmod{125}$ and $2^i\equiv 2^j\pmod{8}$. But the latter holds for all $i,j$ that are at least $3$. So instead focus on the former. It turns out that the order of $2$, mod $125$, is $100$. That is, $2^{100}\equiv 1\pmod{125}$, but not for any smaller positive (integer) power.

vadim123
  • 83,937
4

Continuing vadim123's answer, we have that $n\geq 3$ implies $2^n\equiv 0\pmod{8}$. The subgroup generated by $2$ in $\mathbb{Z}_{/125\mathbb{Z}}^*$ is the whole $\mathbb{Z}_{/125\mathbb{Z}}^*$, since: $$ \left|\mathbb{Z}_{/125\mathbb{Z}}^*\right|=100,\quad 2^{50}\equiv -1\pmod{125},\quad 2^{20}\equiv 76\pmod{125} $$ so a power of two $\pmod{125}$ is allowed to be anything but a multiple of five. So for any $n\geq 3$, $2^{n}\pmod{1000}$ is a multiple of eight but not a multiple of five. No further restrictions. Then we just have to compute:

$$\left(2^0+2^1+2^2\right)+\left(2^{3}+2^4+\ldots+2^{102}\right)\pmod{1000}$$ since that sum accounts for every possible remainder. The previous line is $\equiv 7\pmod{8}$ and $7\pmod{125}$, hence the answer is simply $\color{red}{7}$.

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
Jack D'Aurizio
  • 361,689
  • (+1) tricky notation, no clue of some of these but I'll try to understand the best. Why cant it be a multiple of $5$? is it because if $x = 5y$ then $x \equiv 0 \pmod{125}$, but that isnt necesarily true though. ? – Amad27 Jul 26 '15 at 19:22
  • $2$ and $5^3$ are coprime, hence $gcd(2^n,5^3)=1$ for any $n\geq 0$. – Jack D'Aurizio Jul 26 '15 at 19:24
  • Yes I saw that because of Euler's theorem, but that doesnt imply anything about divisibility by $5$ though? – Amad27 Jul 26 '15 at 19:25
  • @Amad27: that is really trivial. If $2^n = 125a+5b$, $5$ divides $2^n$. That cannot happen. – Jack D'Aurizio Jul 26 '15 at 19:26
  • alright so far so good. Now the tricky part is $2^{100}, 2^{101}, 2^{102}$. I stopped at $2^{99}$ since $\pmod{125}$ it cycles after $2^{100}$ so $2^{102} \equiv 4 \pmod{125}$ and we already counted that? – Amad27 Jul 26 '15 at 19:27
  • 1
    @Amad27 : it is true that $2^{102}\equiv 2^{2}\pmod{125}$, but that is not true $\pmod{8}$, so it cannot be true $\pmod{1000}$. Every possible remainder of $2^n \pmod{1000}$ is given by $0\leq n \leq 102$. – Jack D'Aurizio Jul 26 '15 at 19:30
  • $2^{102} \equiv 0 \pmod{8}$ already taken care of? – Amad27 Jul 26 '15 at 19:37
  • @Amad27: $2^n\not\equiv 0\pmod{8}$ is accounted by $n=0,1,2$. If we take any $n$ in the range $[3,102]$, we have $2^n\equiv 0\pmod{8}$ and every possible remainder $\pmod{125}$ accounted once. – Jack D'Aurizio Jul 26 '15 at 19:47
  • okay, what is the remainder for $2^{102}$? its so confusing, since mod 8 it is 0 but we still count it – Amad27 Jul 26 '15 at 19:49
  • 1
    @Amad27: $2^{102}\equiv 0\pmod{8}$ and $2^{102}\equiv 2^2\equiv 4\pmod{125}$, hence $2^{102}\equiv 504\pmod{1000}$. It is the first power of two that ends with a $504$, so we have to count it. – Jack D'Aurizio Jul 26 '15 at 20:11
  • Okay thanks a lot. But are you sure it is the first one? Also then what about $2^{103}, 2^{104}...$? – Amad27 Jul 26 '15 at 20:13
  • @Amad27: that follows from $2$ being a generator for $\mathbb{Z}_{/\mathbb{Z}125}^*$. I won't explain my answer further, I think it is quite clear. – Jack D'Aurizio Jul 26 '15 at 20:14
  • JackD'Aurizio, your answer has been great ( I accepted it). Can I ask a question about your notation quickly? (I'll wait until your reply) – Amad27 Jul 26 '15 at 20:16
1

(This is a complete solution, not just a hint.)

Preamble: The solutions here (and on AOPS), use the fact that the order of 2 mod 125 is 100. If you're not familiar with how to lift orders, then it can be tedious to calculate/verify by checking certain powers (esp on the AIME if you're time stressed). As it turns out, we do not need that. We can simply use the following:

Lemma: If $\gcd(a(a -1) , n) = 1$, then the sum of the complete residues of $ a^k \pmod{n}$ is always $0 \pmod{n}$.

Proof: Let the order of $a$ be $O$. Then,
$$ 1 + a + a^ 2+ \ldots + a^{O-1} \equiv \frac{ a^O - 1 } { a - 1 } \equiv 0 \pmod{n}.$$

Corollary: In particular for $ a =2$ and odd $n$, the sum of the $2^k$ complete residues will be 0 mod $n$.
Hence, $ S = 1 + 2^1 + 2^2 + (2^3 + \ldots + 2^{O+2} ) \equiv 7 + 0 \pmod{125}$.

We can also easily calculate $ S = 1 + 2^1 + 2^2 + 2^3 + \ldots \equiv 7 \pmod{8}$. Thus, $ S \equiv 7 \pmod{1000}$.

Calvin Lin
  • 77,541
  • The Lemma (and likely the application too) are duplicates, but I don't have time to search at the moment. – Bill Dubuque Aug 26 '24 at 18:05
  • @BillDubuque I defer to you. Let me know what to do with this solution. I agree it's very likely that such an idea has been posted on MSE before. – Calvin Lin Aug 26 '24 at 18:07
  • Will do. But it's trivial to lift $,{\rm ord}(2) = 4\pmod{!5^{\large\bf \color{#c00}1}},$ to $,{\rm ord}(2) = 4\cdot 5^{\large \color{#0af}3-\bf \color{#c00}1}!\pmod{!5^{\color{#0af}3}}\ \ $ – Bill Dubuque Aug 26 '24 at 18:31
  • I agree that calculating orders is easy when you know what/how to do. I'm factoring in the experience/knowledge of these AIME students ( EG Jack and AOPS calculated the order via $2^{50}, 2^{20 } \neq 1$). Edited my preamble to reflect this. – Calvin Lin Aug 26 '24 at 18:40
  • Jack rotely applied the Order Test. $\ \ $ – Bill Dubuque Aug 26 '24 at 18:41
  • I agree he did, per my comment. I'm referring to calculating $2^{25}, 2^{50} \pmod{125}$ can be tedious.(And yes, trying to find the first $2^k \equiv 1$ would be even more tedious and not recommended.) – Calvin Lin Aug 26 '24 at 18:47
  • Here is one said duplicate. $\ \ $ – Bill Dubuque Feb 04 '25 at 11:13