Towering Product

What are the last two digits of

( 2 2 0 + 1 ) ( 2 2 1 + 1 ) ( 2 2 2 + 1 ) ( 2 2 3 + 1 ) ( 2 2 1024 + 1 ) (2^{2^0} + 1) ( 2^{2^1} +1 ) ( 2^{2^2} + 1)(2^{2^3} + 1) \ldots (2^{2^{1024}} + 1 )


The answer is 95.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

11 solutions

Obwj Obid
Sep 17, 2013

Let S = ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) . . . ( 2 2 1024 + 1 ) S=(2^{2^{0}}+1)(2^{2^{1}}+1)...(2^{2^{1024}}+1) , As ( 2 2 0 1 ) = 1 (2^{2^{0}}-1)=1 , S = ( 2 2 0 1 ) ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) . . . ( 2 2 1024 + 1 ) S=(2^{2^{0}}-1)(2^{2^{0}}+1)(2^{2^{1}}+1)...(2^{2^{1024}}+1) = ( 2 2 1 1 ) ( 2 2 1 + 1 ) ( 2 2 2 + 1 ) . . . ( 2 2 1024 + 1 ) =(2^{2^{1}}-1)(2^{2^{1}}+1)(2^{2^{2}}+1)...(2^{2^{1024}}+1) ... = ( 2 2 1024 1 ) ( 2 2 1024 + 1 ) =(2^{2^{1024}}-1)(2^{2^{1024}}+1) = 2 2 1025 1 =2^{2^{1025}}-1 . To evaluate 2 1025 1 ^{2^{1025}}-1 ,note that 2 2 2 16 ( m o d 100 ) 2^{2^{2}} ≡ 16 (mod100) , 2 2 3 16 16 56 ( m o d 100 ) 2^{2^{3}} ≡ 16*16 ≡ 56 (mod100) , 2 2 4 56 56 36 ( m o d 100 ) 2^{2^{4}} ≡ 56*56 ≡ 36 (mod100) , 2 2 5 36 36 96 ( m o d 100 ) 2^{2^{5}} ≡ 36*36 ≡ 96 (mod100) , 2 2 6 96 96 16 ( m o d 100 ) 2^{2^{6}} ≡ 96*96 ≡ 16 (mod100) , This gives us 2 2 4 k + 1 96 ( m o d 100 ) 2^{2^{4k+1}} ≡ 96 (mod100) for postive integers k k . Then 2 2 1025 1 2 2 4 ( 256 ) + 1 1 96 1 95 ( m o d 100 ) 2^{2^{1025}}-1 ≡ 2^{2^{4(256)}+1}-1 ≡ 96-1 ≡ 95 (mod100)

Moderator note:

Nicely done!

Brilliant indeed !

Thank You!

Priyansh Sangule - 7 years, 8 months ago

wow enlightening. and to think I just took mod 4 and 125, with the 125 one using euler's totient theorem. ugly.

thank you for sharing!

Jonathan Wong - 7 years, 8 months ago

Aw, this is what I did. Unfortunately, I noticed a major LaTeXing typo, but I accidentally clicked continue, so I cannot publish the solution. But nice job!!!

Tanishq Aggarwal - 7 years, 8 months ago
Zi Song Yeoh
Sep 15, 2013

First, let P P be the product. Multiply P P by ( 2 2 0 1 ) = 1 (2^{2^{0}} - 1) = 1 , and using the difference of two squares, we get

P = ( 2 2 0 1 ) ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) . . . ( 2 2 1024 + 1 ) P = (2^{2^{0}} - 1)(2^{2^{0}} + 1)(2^{2^{1}} + 1)...(2^{2^{1024}} + 1)

= ( 2 2 1 1 ) ( 2 2 1 + 1 ) ( 2 2 2 + 1 ) . . . ( 2 2 1024 + 1 ) = (2^{2^{1}} - 1)(2^{2^{1}} + 1)(2^{2^{2}} + 1)...(2^{2^{1024}} + 1)

...

( 2 2 1024 1 ) ( 2 2 1024 + 1 ) (2^{2^{1024}} - 1)(2^{2^{1024}} + 1)

= 2 2 1025 1 2^{2^{1025}} - 1 .

Next, we proceed by determining the last two digits of P P .

First, note that 2 40 ( 2 10 ) 4 ( 24 ) 4 = ( 576 ) 2 ( 76 ) 2 76 ( m o d 100 ) 2^{40} \equiv (2^{10})^4 \equiv (24)^{4} = (576)^{2} \equiv (76)^{2} \equiv 76 \pmod{100} . Also, by mathematical induction, we can easily prove that 7 6 k 76 ( m o d 100 ) 76^{k} \equiv 76 \pmod{100} . Now, we determine 2 1025 ( m o d 40 ) 2^{1025} \pmod{40} .

2 1025 0 ( m o d 8 ) 2^{1025} \equiv 0 \pmod{8} and 2 1022 4 ( m o d 5 ) 2^{1022} \equiv 4 \pmod{5} . So, 2 1025 32 ( m o d 40 ) 2^{1025} \equiv 32 \pmod{40} .

Thus, 2 2 1025 2 32 76 ( 2 16 ) 2 76 ( 65536 ) 2 76 3 6 2 76 96 76 96 ( m o d 100 ) 2^{2^{1025}} \equiv 2^{32} \cdot 76 \equiv (2^{16})^2 \cdot 76 \equiv (65536)^2 \cdot 76 \equiv 36^{2} \cdot 76 \equiv 96 \cdot 76 \equiv 96 \pmod{100} .

Thus, the last two digits of P P is 96 1 = 95 96 - 1 = 95 .

Moderator note:

Nicely done!

Another way to do the last two digits is: 2 2 2 16 m o d 100 2 2 3 16 16 = 56 m o d 100 2 2 4 56 56 = 36 m o d 100 2 2 5 36 36 = 96 m o d 100 2 2 6 96 96 = 16 m o d 100 \begin{aligned} 2^{2^2} &\equiv 16 \mod 100 \\ 2^{2^3} &\equiv 16 * 16 = 56 \mod 100 \\ 2^{2^4} &\equiv 56 * 56 = 36 \mod 100 \\ 2^{2^5} &\equiv 36 * 36 = 96 \mod 100 \\ 2^{2^6} &\equiv 96 * 96 = 16 \mod 100 \end{aligned} because each line is the square of the previous one; so this tells us 2 2 4 k + 1 96 2^{2^{4k+1}} \equiv 96 .

Matt McNabb - 7 years, 8 months ago

Log in to reply

Indeed, this repeated squaring procedure is very effective here. (It is also good for many other purposes).

Alexander Borisov - 7 years, 8 months ago

Log in to reply

Well , I think think problem can also be done by digit cyclicity . Can't it ?

Priyansh Sangule - 7 years, 8 months ago

You can also solve it this way:

First, notice that the sum equals \sum_{n = 0}^{2^{1025} - 1} 2^n = 2^2^{1025} - 1 (not sure why latex isn't working for this expression) If this is hard to understand, think of it as choosing one term from each binomial. You can have 2 0 2^0 with picking all 1's, 2 1 2^1 with picking all 1's except 2 1 2^1 , 2 2 2^2 the same way, 2 3 2^3 by picking 2 1 2^1 and 2 2 2^2 , etc. Since this is essentially a binary number system, you can make any integer (up to \(2^{2^{1025} - 1}

The last two digits of \(2^n\) are periodic with period 20. Since 20 is divisible by 100, we only need to find the last two digits of 2 1025 2^{1025} . This is 2 5 32 ( m o d 100 ) 2^5 \equiv 32 \pmod {100} . Thus 2 32 2 12 4096 96 ( m o d 100 ) 2^{32} \equiv 2^{12} \equiv 4096 \equiv 96 \pmod {100} . Thus, 2 2 1025 1 95 ( m o d 100 ) 2^{2^{1025} - 1} \equiv 95 \pmod {100}

I'm posting this here since I accidentally got the question wrong because I made two stupid computation errors and had a third lapse in judgement.

Michael Tong - 7 years, 9 months ago

Log in to reply

For the latex to work the last bit needs to be 2^{2^{1025}} - 1

Matt McNabb - 7 years, 8 months ago
Etienne Vouga
Sep 16, 2013

The product, when expanded, contains two raised to all 1024-digit binary numbers. In other words the product can be written as the sum i = 0 2 1025 1 2 i \sum_{i=0}^{2^{1025}-1} 2^i or 2 2 1025 1 = 4 2 1024 1. 2^{2^{1025}}-1 = 4^{2^{1024}}-1. We need this huge number modulo 100. Since 4^10=4 mod 100, this is 4^6-1 mod 100 = 95.

Moderator note:

A very nice and original solution! The product, of course, is not infinite, as noted in the author's comment.

Not an infinite product, obviously. Is there any way to edit posts?

Etienne Vouga - 7 years, 8 months ago

Log in to reply

You can edit posts but not solutions (this is to stop people making their own solutions look better after they see other solutions, thereby getting extra votes)

Matt McNabb - 7 years, 8 months ago
Jan J.
Sep 16, 2013

We shall use the standard notation for fermat numbers F n = 2 2 n + 1 F_n = 2^{2^n} + 1 . Then F n 2 = ( F n 1 1 ) 2 1 F n 2 = F n 1 ( F n 1 2 ) F n 2 = F n 1 F n 2 ( F n 2 2 ) F_n - 2 = (F_{n - 1} - 1)^2 - 1 \\ F_n - 2 = F_{n - 1}(F_{n - 1} - 2) \\ F_{n} - 2 = F_{n - 1}F_{n - 2}(F_{n - 2} - 2) \\ \vdots Hence by mathematical induction F n 2 = i = 0 n 1 F i F_n - 2 = \prod_{i = 0}^{n - 1} F_i Thus i = 0 1024 F i = F 1025 2 = 2 2 1025 1 \prod_{i = 0}^{1024}F_i = F_{1025} - 2 = 2^{2^{1025}} - 1 Now obviously 2 2 1025 0 ( m o d 4 ) 2^{2^{1025}} \equiv 0 \pmod{4} Also ϕ ( 25 ) = 20 \phi(25) = 20 , hence 2 2 1025 2 2 1025 m o d 20 ( m o d 25 ) 2^{2^{1025}} \equiv 2^{2^{1025} \mod 20} \pmod{25} Now it's easy to prove by induction that 2 4 a + 1 12 ( m o d 20 ) 2^{4a + 1} \equiv 12 \pmod{20} for a N a \in \mathbb{N} . Therefore 2 1025 12 ( m o d 20 ) 2^{1025} \equiv 12 \pmod{20} and consequently 2 2 1025 2 12 21 ( m o d 25 ) 2^{2^{1025}} \equiv 2^{12} \equiv 21 \pmod{25} This means that there exists x N x \in \mathbb{N} 2 2 1025 = 25 x + 21 2^{2^{1025}} = 25x + 21 , remember that 2 2 1025 0 ( m o d 4 ) 2^{2^{1025}} \equiv 0 \pmod{4} , so 25 x + 21 0 ( m o d 4 ) x 3 ( m o d 4 ) 25x + 21 \equiv 0 \pmod{4} \Leftrightarrow x \equiv 3 \pmod{4} Hence there exists y N y \in \mathbb{N} such that x = 4 y + 3 x = 4y + 3 , hence 2 2 1025 = 25 ( 4 y + 3 ) + 21 = 100 y + 96 2^{2^{1025}} = 25(4y + 3) + 21 = 100y + 96 That is to say 2 2 1025 1 95 ( m o d 100 ) 2^{2^{1025}} - 1 \equiv \boxed{95} \pmod{100}

Moderator note:

Nicely done!

Russell Few
Sep 16, 2013

Lemma : ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) . . . ( 2 2 n + 1 ) = 2 2 n + 1 1 (2^{2^0}+1)(2^{2^1}+1)...(2^{2^n}+1)=2^{2^{n+1}}-1 for all n 0 n \ge 0 .

Proof :

We would prove this by induction.

Base case: n = 0 n=0 If n = 0 n=0 , we have ( 2 2 0 + 1 ) = 3 = 2 2 1 = 2 2 1 1 (2^{2^0}+1)=3=2^2-1=2^{2^1}-1 .

Suppose we have ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) . . . ( 2 2 n + 1 ) = 2 2 n + 1 1 (2^{2^0}+1)(2^{2^1}+1)...(2^{2^n}+1)=2^{2^{n+1}}-1 .

Then

( ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) . . . ( 2 2 n + 1 ) ) ((2^{2^0}+1)(2^{2^1}+1)...(2^{2^n}+1)) ( 2 2 n + 1 + 1 ) (2^{2^{n+1}}+1)

= ( 2 2 n + 1 1 ) =(2^{2^{n+1}}-1) ( 2 2 n + 1 + 1 ) (2^{2^{n+1}}+1)

= 2 2 n + 1 2 1 =2^{2^{n+1} \cdot 2}-1 = 2 2 n + 2 1 =2^{2^{n+2}}-1 = 2 2 ( n + 1 ) + 1 1 =2^{2^{(n+1)+1}}-1 .

Hence our lemma is proved.

Thus the original expression is equivalent to 2 2 1025 1 2^{2^{1025}}-1 .

Now we would find the remainder when 2 2 1025 2^{2^{1025}} is divided by 25 25 and when it is divided by 4 4 .

We would first find the remainder when 2 1025 2^{1025} is divided by 40 40 . Note that 2 2 = 4 4 m o d 20 2^2=4 \cong 4 mod 20 , and 2 4 16 m o d 20 2^4 \cong 16 mod 20 . Now suppose that 2 4 k + 2 4 m o d 20 2^{4k+2} \cong 4 mod 20 . Then 2 4 k + 6 = 2 4 ( k + 1 ) + 2 ( 4 ) ( 16 ) 4 m o d 20 2^{4k+6}=2^{4(k+1)+2} \cong (4)(16) \cong 4 mod 20 . By mathematical induction, 2 4 k + 2 4 m o d 20 2^{4k+2} \cong 4 mod 20 . Hence 2 1 022 4 m o d 20 2^1022 \cong 4 mod 20 , and 2 1 025 32 m o d 20 12 m o d 20 2^1025 \cong 32 mod 20 \cong 12 mod 20 .

By Euler's Theorem, since ϕ ( 25 ) = 20 \phi(25)=20 , 2 2 1025 2 1 2 4096 21 m o d 25 2^{2^{1025}} \cong 2^12 \cong 4096 \cong 21 mod 25 .

2 2 1025 2^{2^{1025}} is clearly divisible by 4 4 .

If a number is congruent to 21 m o d 25 21 mod 25 and is divisible by 4 4 , then it is congruent to 96 m o d 100 96 mod 100 . (We could check by trying 21 21 , 46 46 , 71 71 , and 96 96 .

Hence the last 2 2 digits of 2 2 1025 2^{2^{1025}} is 96 96 , and the last 2 2 digits of 2 2 1025 1 2^{2^{1025}}-1 is 95 \boxed{95} .

LaTeX tip: a \equiv 4 \mod 20 a 4 m o d 20 \mbox{ } a \equiv 4 \mod 20

Matt McNabb - 7 years, 8 months ago

Log in to reply

You can also do \ p m o d { 20 } \backslash pmod \{20\} for ( m o d 20 ) \pmod {20}

Alexander Borisov - 7 years, 8 months ago

Thanks, also a small typo, 2 1 2 2^12 should be 2 12 2^{12} .

Russell FEW - 7 years, 8 months ago
Tuan Dinh
Sep 17, 2013

Let A is the expression, we have: A = ( 2 2 0 2^{ 2^{0} } - 1 )A = 2 1025 2^{1025} - 1.

The 2 k 2^{k} (k = 0, 1, 2,..) have remainder mod 25 is 2, 4, {16, 6, 11, 21}

1025 = 1 (mod 4}, so 2 1025 2^{1025} = 21 (mod 25).

Moreover, 2 1025 2^{1025} = 0 (mod 4)

So, 2 1025 2^{1025} = 96 (mod 100)

96 is the answer

sorry, 95 = 96 -1 is the answer

Tuan Dinh - 7 years, 8 months ago

temos q isso é igual a 2^(2^1025) - 1 q é congruente a 56^(2^1022) - 1 (mod 100), mas isso é igual a : 55(56^(2^1022-1)+...+1), chamemos (56^(2^1022-1)+...+1) de K, temos q K é congruente a 9 (mod 20), temos q 55K será congruente a 95 (mod 100) o q conclui nossa resposta

We can easily find out through smaller values that i = 1 x ( 2 2 x + 1 ) = ( 2 2 x + 1 1 ) \prod_{i=1}^x (2^{2^x}+1) = (2^{2^{x+1}}-1) . Since 2 1025 2^{1025} ends with 32 and 2 32 2^{32} ends with 96, i = 1 1024 ( 2 2 x + 1 ) = ( 2 2 1025 1 ) \prod_{i=1}^{1024} (2^{2^x}+1) = (2^{2^{1025}}-1) ends with 95.

This gives the right answer, but not a complete proof. Once the pattern is recognized, it still needs to be proven (for example, by induction).

Alexander Borisov - 7 years, 8 months ago

Log in to reply

Yes, I'm aware of that. Sorry :P Wish I could delete it.

Guilherme Dela Corte - 7 years, 8 months ago
Tan Kiat
Sep 17, 2013

Notice that 2 2 0 + 1 = 3 = 2 2 1 2^{2^{0}} + 1 = 3 = 2^2 - 1 , ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) = 15 = 2 4 1 (2^{2^{0}} + 1)(2^{2^{1}} + 1) = 15 = 2^4 - 1 , ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) ( 2 2 2 + 1 ) = 255 = 2 8 1 (2^{2^{0}} + 1)(2^{2^{1}} + 1)(2^{2^{2}} + 1) = 255 = 2^8 -1 . Hence, ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) ( 2 2 2 + 1 ) . . . ( 2 2 N + 1 ) = 2 2 N + 1 1 (2^{2^{0}} + 1)(2^{2^{1}} + 1)(2^{2^{2}} + 1)... (2^{2^{N}} + 1) = 2^{2^{N+1}} - 1 . Thus, ( 2 2 0 + 1 ) ( 2 2 1 + 1 ) ( 2 2 2 + 1 ) . . . ( 2 2 1024 + 1 ) = 2 2 1025 1 (2^{2^{0}} + 1)(2^{2^{1}} + 1)(2^{2^{2}} + 1)... (2^{2^{1024}} + 1) = 2^{2^{1025}} - 1

Note that the last 2 digits of the 2 N 2^N series repeats for 20 values of N. That is, 2 0 = 01 , 2 1 = 02 , 2 2 = 04 , 2 3 = 08 , 2 4 = 16... , 2 22 = 04 , 2 23 = 08 , 2 24 = 16 , . . . 2^0 = 01 , 2^1 = 02 , 2^2 = 04 , 2^3 = 08 , 2^4 = 16..., 2^{22} = 04 , 2^{23} = 08 , 2^{24} = 16,... etc. In this case, we would note the case of 2 5 = 32 2^5 = 32 and 2 12 = ( 40 ) 96 2^{12} = (40)96

Hence, 2 1025 ( m o d 20 ) = 2 5 = 12 2^{1025 (mod 20)} = 2^5 = 12 implies that 2 2 1025 1 = 2 . . . 12 1 2^{2^{1025}} - 1 = 2^{...12} - 1 , and thus , 2 . . . 12 ( m o d 20 ) 1 = 2 12 1 = 96 1 = 2^{...12(mod20)} - 1 = 2^{12} -1 = 96 - 1 = 95 95 Thus, the answer is 95

Multiplying above and below by 2^(2^0) - 1 i.e. 1, we reduce the sum into 2^(2^1025) - 1.

Now, 2^1025 = 32mod100

2^(a large number with units and tens digits both zero + 32) = (2^10)^(a large number ending in zero) x 2^32.

The first term ends in 76 as given by number theory. Now, 2^8 = 56mod100 so 2^32 = 56^4mod100 = (50+6)^4mod100 = 4x50x6^3 + 6^4

Computation yields the final answer for 2^2^1025 as 96 (last two digits) and you subtract 1 from it so you get 95.

Luis Rivera
Sep 18, 2013

Note 2 2 0 + 1 = 2 2 1 1 2^{2^0}+1=2^{2^1}-1 , and a massive sequential difference of squares will develop. You then reach 2 2 1025 1 2^{2^{1025}}-1 .Note that 2 2 2 6 ( m o d 20 ) 2^2\equiv 2^6\pmod{20} and that 2 2 4 2 2 22 ( m o d 100 ) 2^{2^4}\equiv 2^{2^{22}}\pmod{100} , so 2 n 2^n is 4 4 -periodical ( m o d 20 ) \pmod{20} and 20 20 -periodical ( m o d 100 ) \pmod{100} .

Since 1025 5 ( m o d 4 ) 1025\equiv 5 \pmod{4} (the first power is power is the non-periodical part), our answer is 2 2 1025 1 2 2 5 1 2 12 1 95 ( m o d 100 ) 2^{2^{1025}}-1\equiv 2^{2^5}-1\equiv 2^{12}-1\equiv\ 95\pmod{100}

Sorry, I meant 2 2 2 22 ( m o d 100 ) 2^2 \equiv 2^{22} \pmod{100}

Luis Rivera - 7 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...