2 0 1 6 2 0 1 5 2 0 1 4 2 0 1 3 . . . . 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.
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.
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
Log in to reply
Great problem and solution! What caused you to think about the sets S m ?
Most people would want to approach this from euler's theorem , but run into issues pretty quickly.
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.
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 , 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 is a multiple of 1 0 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.
Log in to reply
concerning the note just put ( A mod 1 0 m ) 2 instead of A 2
This was in the example I gave . I may missed to write it correctly.
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.
Log in to reply
@Calvin Lin – I see. just I will not edit it without telling you.
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.
wonderful solution !!thank you for sharing a great idea :)
You can use a calculator or computer program. the funniest thing hahah
We can see that ∀ n > = 4 0 3 we have 2 0 1 6 n ≡ 2 0 1 6 n + 5 2 0 1 4 m o d 1 0 2 0 1 5
Then 2 0 1 6 2 0 1 5 2 0 1 4 2 0 1 3 . . . . 3 2 1 ≡ 2 0 1 6 5 2 0 1 4 m o d 1 0 2 0 1 5
Big calculator the result is 2
Problem Loading...
Note Loading...
Set Loading...
[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 ) } . This means that if a number is in S m then the rightmost m digits will not change when we raise this number to any positive integer power.
Claim: If A ∈ S m and A ≡ 6 ( m o d 1 0 ) , then A 5 ∈ S m + 1 .
Proof: Let A = 1 0 m B + C where 0 ≤ C < 1 0 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 .
To show that A 5 ∈ S m + 1 , we just need to show that A 1 0 ≡ A 5 ( m o d 1 0 m + 1 ) . Let's simplify this further.
Using the Binomial theorem, A 1 0 = ( 1 0 m B + C ) 1 0 ≡ C 1 0 ( m o d 1 0 m + 1 ) .
Likewise, A 5 = ( 1 0 m B + C ) 5 ≡ ( 1 5 ) × 1 0 m B × C + C 5 ( m o d 1 0 m + 1 ) . Since C is even, hence the first term is a multiple of 1 0 m + 1 , and so A 5 ≡ C 5 ( m o d 1 0 m + 1 ) .
As such, it is equivalent to show that C 1 0 ≡ C 5 ( m o d 1 0 m + 1 ) , or that 1 0 m + 1 ∣ C 1 0 − C 5 . Observe that:
C 1 0 − 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 ) .
Now, since C ≡ 6 ( m o d 1 0 ) , thus 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 ) so it contributes a multiple of 5. From above, we know that C 2 − C is a multiple of 1 0 m . Hence we conclude that their product is a multiple of 1 0 m + 1 and we are done! □
By induction, since 2 0 1 6 ∈ S 1 , thus B = 2 0 1 6 5 2 0 1 4 ∈ S 2 0 1 5 . Now, observe that the expression is equal to
2 0 1 6 2 0 1 5 2 0 1 4 . . 2 1 = ( 2 0 1 6 5 2 0 1 4 . . 2 1 ) ( 4 0 3 2 0 1 4 2 0 1 3 . . 2 1 )
As such, we just need to find the 2015th digit of 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 and A ≡ 6 ( m o d 1 0 ) and A = 1 0 m B + C , then the ( m + 1 ) -digit of A 5 is equal to 10 minus the ( m + 1 ) digit of C 2 .