Once again 2016 simplified

201 6 201 5 201 4 201 3 . . . . 3 2 1 \large 2016^{2015^{2014^{2013^{..^{..^{3^{2^{1}}}}}}}}

Find the 2015th rightmost digit of the decimal representation of the number above.


You can use a calculator or computer program, though be warned that the naive approach would likely overflow.
Try the harder version here.


The answer is 2.

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.

2 solutions

Mr X
Nov 29, 2016

[Note: The naive euler's theorem approach does not appear to yield a simple answer to this problem.]

Define S m = { n N : a , b N + n a n b ( mod 1 0 m ) } S_{m}=\{n \in N: \forall a, b\in N^{+} n^{a} \equiv n^{b} (\text {mod }10^{m})\} . This means that if a number is in S m S_{m} then the rightmost m m digits will not change when we raise this number to any positive integer power.

Claim: If A S m A \in S_m and A 6 ( m o d 10 ) A \equiv 6 \pmod{10} , then A 5 S m + 1 A^ 5 \in S_{m+1} .

Proof: Let A = 1 0 m B + C A = 10^m B + C where 0 C < 1 0 m 0 \leq C < 10^m .
We are given that A 2 A ( m o d 1 0 m ) C 2 C ( m o d 1 0 m ) 1 0 m C 2 C A^2 \equiv A \pmod{ 10^m } \Rightarrow C^2 \equiv C \pmod{10^m} \Rightarrow 10^m \mid C^2 - C .

To show that A 5 S m + 1 A^5 \in S_{m+1} , we just need to show that A 10 A 5 ( m o d 1 0 m + 1 ) A^{10} \equiv A^5 \pmod{10^{m+1} } . Let's simplify this further.
Using the Binomial theorem, A 10 = ( 1 0 m B + C ) 10 C 10 ( m o d 1 0 m + 1 ) A^{10} = (10^mB+C)^{10} \equiv C^{10} \pmod{10^{m+1} } .
Likewise, A 5 = ( 1 0 m B + C ) 5 ( 5 1 ) × 1 0 m B × C + C 5 ( m o d 1 0 m + 1 ) A^5 = (10^mB+C)^5 \equiv { 5 \choose 1 } \times 10^m B \times C + C^5 \pmod{10^{m+1} } . Since C C is even, hence the first term is a multiple of 1 0 m + 1 10 ^ { m + 1} , and so A 5 C 5 ( m o d 1 0 m + 1 ) A^5 \equiv C^5 \pmod{ 10 ^ {m+1} } .

As such, it is equivalent to show that C 10 C 5 ( m o d 1 0 m + 1 ) C^{10} \equiv C^5 \pmod{ 10 ^ { m + 1 } } , or that 1 0 m + 1 C 10 C 5 10^{m+1} \mid C^{10} - C^5 . Observe that:

C 10 C 5 = C 5 ( C 5 1 ) = C 5 × ( C 1 ) × ( C 4 + C 3 + C 2 + C + 1 ) = C 4 × ( C 2 C ) × ( C 4 + C 3 + C 2 + C + 1 ) . C^{10} - C^5 = C^5 (C^5 - 1) = C^5 \times (C-1) \times (C^4 + C^3 + C^2 + C + 1) = C^4 \times (C^2 - C) \times (C^4 + C^3 + C^2 + C + 1) .

Now, since C 6 ( m o d 10 ) C \equiv 6 \pmod{10} , thus C 4 C ^4 contributes a multiple of 2, and C 4 + C 3 + C 2 + C + 1 1 + 1 + 1 + 1 + 1 0 ( m o d 5 ) C^4 + C^3 + C^2 + C + 1 \equiv 1 + 1 + 1 + 1 + 1 \equiv 0 \pmod{5} so it contributes a multiple of 5. From above, we know that C 2 C C^2 - C is a multiple of 1 0 m 10^m . Hence we conclude that their product is a multiple of 1 0 m + 1 10^{m+1} and we are done! _ \square

By induction, since 2016 S 1 2016 \in S_1 , thus B = 201 6 5 2014 S 2015 B = 2016^ { 5^{2014} } \in S_{2015} . Now, observe that the expression is equal to

201 6 201 5 201 4 . . 2 1 = ( 201 6 5 201 4 . . 2 1 ) ( 40 3 201 4 201 3 . . 2 1 ) 2016^{2015^{2014^{..^{2^{1}}}}} =(2016^{5^{2014^{..^{2^{1}}}}})^{( 403^{2014^{2013^{..^{2^{1}}}}})}

As such, we just need to find the 2015th digit of B B . At this point, we can either use a big number calculator (which works for this greatly simplified value) or continue doing it by hand via concatenating power calculations.


Note: If A S m A \in S_m and A 6 ( m o d 10 ) A \equiv 6 \pmod{10} and A = 1 0 m B + C A = 10^{m} B + C , then the ( m + 1 ) (m+1) -digit of A 5 A^ 5 is equal to 10 minus the ( m + 1 ) (m+1) digit of C 2 C^2 .

Here are all the 2015 first digits. Even if it looks long but it takes a fraction of time to get the answer if the problem is reduced as mentioned in the above solution.

21917837716427396973045430512075619834511511948935137239379172835840867476390209499061614594573675280106068197790176399837454822318970840603495493342190966947227801614713658120354488575251463692764542950955490874785765724044508156026015541287471305180173072970744735165096793473148727797038681300052223464518708480142359577031816908226554722276799262396174116827270720436342580985554764045680896936427503821011796824212238937862291919032188625068088233436968509794215647490427119331535878930747197724938701488383793615993221020597550976124888741310465450485111799321332297658997160450717029713552726374782464556802088144931842735141195147326128315195997811470526977776655458778671535155846406206336866395541059671276521598052642439638653787991324626653086685661282649119787399714247014613356068977673446545223154970042974438341856629763497925255143185212127097907587417094698750875331131648412322500108231321284271865059120723105470202902227694596643381171801297789369442032760193388809802255357578974863251298882868721874599866309913965110915635976124234063178020373818082166479507295800675124762174132851721094655102559857387682964300451580500555389391853792745963440001728411643964950672204459258038150719047906246973147609062437160851428387632648029390775757601222992425044212728440232586541002462304484137281112058483692430331183647844951101728295621491971565915587355873178151485842270083965502982107664203315008552610433998067454172321999381670145573767172742443889266839302984135015777708744514270120662852133676827594484243897647456005000654391916198809258469939943944255181290307214900224081949924583571472291837988649753193941836723828323234739062471943155785513806039500165527193278093329582759905765533802187573309212464055383301491935363862833615950970780658118090418340475522138153859087121701561568296751826571113427262336853480895011970552039185326239496042803106285328198624380944537003185235736096046992680891830197061490109937833490419136188999442576576769103890995893380022607743740081787109376

Mr X - 4 years, 6 months ago

Log in to reply

Great problem and solution! What caused you to think about the sets S m S_m ?

Most people would want to approach this from euler's theorem , but run into issues pretty quickly.

Calvin Lin Staff - 4 years, 6 months ago

Log in to reply

When I tried to solve it, I started with euler's theorem but it gave me many cases because powers of 10 are not coprime with 2016. So, I tried to forget the traditional way and work it step by step. In this case the best way to construct a solution is to find a special model. In other words, the digits can't be random, so let's find their repeating model and the rest is some intuition, methodology and luck.

Mr X - 4 years, 6 months ago

I would like to feature this problem and it would benefit from having a much clearer solution, so I've been filling in details like why A 5 S m + 1 A^ 5 \in S_{m+1} , which I think is different from your approach.

I left your observation as a note at the bottom because I'm not sure how it fits in. I agree that it is true, and can be proven in a similar way of showing that C ( C 1 ) ( C 3 + C 2 + C + 2 ) = C 5 + C 2 2 C C ( C-1)(C^3 + C^2 + C + 2 ) = C^5 + C^2 - 2C is a multiple of 1 0 m + 1 10 ^ { m+1} .

Can you add more details about how one could approach the final calculation by hand? That would help tie up this entire problem.

Calvin Lin Staff - 4 years, 6 months ago

Log in to reply

concerning the note just put ( A mod 1 0 m ) 2 (A \text { mod }10^m)^2 instead of A 2 A^2

This was in the example I gave . I may missed to write it correctly.

Mr X - 4 years, 6 months ago

Log in to reply

Sorry about that, I had difficulty understanding what you were trying to express in that statement. I've edited it accordingly. Note: You can edit your solutions by clicking on the edit button at the bottom.

Calvin Lin Staff - 4 years, 6 months ago

Log in to reply

@Calvin Lin I see. just I will not edit it without telling you.

Mr X - 4 years, 6 months ago

Log in to reply

@Mr X Oh, just go ahead and edit accordingly. Can you also add in the "continue doing it by hand" part? I'm interested to learn what approaches you have.

Calvin Lin Staff - 4 years, 6 months ago

wonderful solution !!thank you for sharing a great idea :)

Rohith M.Athreya - 4 years, 6 months ago

You can use a calculator or computer program. the funniest thing hahah

Vishwash Kumar ΓΞΩ - 4 years, 6 months ago
Abdelhamid Saadi
Dec 18, 2016

We can see that n > = 403 we have 201 6 n 201 6 n + 5 2014 m o d 1 0 2015 \forall n >= 403 \quad \text{we have} \quad 2016^n \equiv 2016^{n + 5^{2014}} \mod 10^{2015}

Then 201 6 201 5 201 4 201 3 . . . . 3 2 1 201 6 5 2014 m o d 1 0 2015 \large 2016^{2015^{2014^{2013^{..^{..^{3^{2^{1}}}}}}}} \equiv 2016^{5^{2014}} \mod 10^{2015}

Big calculator the result is 2

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...