Powers Get Huge Really Fast

What is the remainder when

1 2016 + 2 2016 + + 201 6 2016 1^{2016}+2^{2016}+\cdots+2016^{2016}

is divided by 2016?


The answer is 48.

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.

1 solution

Pi Han Goh
Feb 25, 2016

Let Z Z denote the value of the sum, 1 2016 + 2 2016 + + 201 6 2016 1^{2016} + 2^{2016} +\cdots + 2016^{2016} . So we want to find the remainder of when Z Z is divided by 2016.

Since 2016 is not a prime number, let's start breaking 2016 into product of pairwise coprime positive integers to get 2016 = 32 × 7 × 9 2016 = 32 \times 7 \times 9 .

This suggests that we want to find Z Z modulo 32 , 7 32, 7 and 9 9 separately so that we can apply chinese remainder theorem .

Let us start by finding Z m o d 32 Z \bmod{32} , and we partition the terms of Z Z as such

1 2016 + 2 2016 + + 201 6 2016 = ( 1 2016 + 2 2016 + + 3 2 2016 ) + ( 3 3 2016 + 3 4 2016 + + 6 4 2016 ) + ( 6 5 2016 + 3 6 2016 + + 9 6 2016 ) + + ( 198 5 2016 + 198 6 2016 + + 201 6 2016 ) \begin{aligned} 1^{2016} + 2^{2016} +\cdots + 2016^{2016} &=& \left( 1^{2016} + 2^{2016} + \cdots + 32^{2016} \right) \\ && + \left( 33^{2016} + 34^{2016} + \cdots + 64^{2016} \right) \\ && + \left( 65^{2016} + 36^{2016} + \cdots + 96^{2016} \right) \\ && + \cdots \\ && + \left( 1985^{2016} + 1986^{2016} + \cdots + 2016^{2016} \right) \end{aligned}

Taking modulo 32, we have

1 2016 + 2 2016 + + 201 6 2016 ( 1 2016 + 2 2016 + + 3 1 2016 ) + ( 1 2016 + 2 2016 + + 3 1 2016 ) + ( 1 2016 + 2 2016 + + 3 1 2016 ) + + ( 1 2016 + 2 2016 + + 3 1 2016 ) 2016 32 × ( 1 2016 + 2 2016 + + 3 1 2016 ) 63 ( 1 2016 + 3 2016 + 5 2016 + + 2 9 2016 + 3 1 2016 ) , all the even powers are divisible by 32 63 ( 1 2016 m o d ϕ ( 32 ) + 3 2016 m o d ϕ ( 32 ) + 5 2016 m o d ϕ ( 32 ) + + 3 1 2016 m o d ϕ ( 32 ) ) , by Euler totient function 63 ( 1 × 16 ) 16 \begin{aligned} && 1^{2016} + 2^{2016} +\cdots + 2016^{2016} \\ &\equiv& \left( 1^{2016} + 2^{2016} + \cdots + 31^{2016} \right) \\ && + \left( 1^{2016} + 2^{2016} + \cdots + 31^{2016} \right) \\ && + \left( 1^{2016} + 2^{2016} + \cdots + 31^{2016} \right) \\ && + \cdots \\ && + \left( 1^{2016} + 2^{2016} + \cdots + 31^{2016} \right) \\ &\equiv& \dfrac{2016}{32} \times \left( 1^{2016} + 2^{2016} + \cdots + 31^{2016} \right) \\ &\equiv& 63 \left( 1^{2016} + 3^{2016} + 5^{2016} + \cdots + 29^{2016} + 31^{2016} \right) , \quad \text{ all the even powers are divisible by 32} \\ &\equiv& 63 \left( 1^{2016 \bmod{\phi(32)}} + 3^{2016\bmod{\phi(32)}} + 5^{2016\bmod{\phi(32)}} + \cdots + 31^{2016\bmod{\phi(32)}} \right), \quad \text{ by Euler totient function} \\ &\equiv& 63 \left( 1 \times 16 \right) \equiv 16 \\ \end{aligned}

Thus we have Z m o d 32 = 16 Z \bmod {32} = 16 .

Analogously, let us find Z m o d 7 Z \bmod 7 and Z m o d 9 Z \bmod 9 .

For Z m o d 7 Z\bmod 7 , partitioning the terms gives

1 2016 + 2 2016 + + 201 6 2016 = ( 1 2016 + 2 2016 + + 7 2016 ) + ( 8 2016 + 9 2016 + + 1 4 2016 ) + ( 1 5 2016 + 1 6 2016 + + 2 1 2016 ) + + ( 201 0 2016 + 198 6 2016 + + 201 6 2016 ) ( 1 2016 + 2 2016 + + 7 2016 ) + ( 1 2016 + 2 2016 + + 7 2016 ) + ( 1 2016 + 2 2016 + + 7 2016 ) + + ( 1 2016 + 198 6 2016 + + 7 2016 ) 2016 7 ( 1 2016 + 2 2016 + + 6 2016 ) 288 ( 1 2016 + 2 2016 + + 6 2016 ) 288 ( 1 2016 m o d ϕ ( 7 ) + 2 2016 m o d ϕ ( 7 ) + + 6 2016 m o d ϕ ( 7 ) ) 288 ( 1 × 6 ) 6 \begin{aligned} &&1^{2016} + 2^{2016} +\cdots + 2016^{2016} \\ &=& \left( 1^{2016} + 2^{2016} + \cdots + 7^{2016} \right) \\ && + \left( 8^{2016} + 9^{2016} + \cdots + 14^{2016} \right) \\ && + \left( 15^{2016} + 16^{2016} + \cdots + 21^{2016} \right) \\ && + \cdots \\ && + \left( 2010^{2016} + 1986^{2016} + \cdots + 2016^{2016} \right) \\ &\equiv & \left( 1^{2016} + 2^{2016} + \cdots + 7^{2016} \right) \\ && + \left( 1^{2016} + 2^{2016} + \cdots + 7^{2016} \right) \\ && + \left( 1^{2016} + 2^{2016} + \cdots + 7^{2016} \right) \\ && + \cdots \\ && + \left( 1^{2016} + 1986^{2016} + \cdots + 7^{2016} \right) \\ &\equiv & \dfrac{2016}7 \left( 1^{2016} + 2^{2016} + \cdots + 6^{2016} \right) \\ &\equiv & 288 \left( 1^{2016} + 2^{2016} + \cdots + 6^{2016} \right) \\ &\equiv & 288 \left( 1^{2016 \bmod{\phi(7)}} + 2^{2016 \bmod{\phi(7)}} + \cdots + 6^{2016 \bmod{\phi(7)}} \right) \\ &\equiv & 288 \left( 1 \times 6 \right) \equiv 6 \\ \end{aligned}

Lastly, to find Z m o d 9 Z \bmod 9 , partitioning the terms gives us

1 2016 + 2 2016 + + 201 6 2016 = ( 1 2016 + 2 2016 + + 9 2016 ) + ( 1 0 2016 + 1 1 2016 + + 1 8 2016 ) + ( 1 9 2016 + 2 0 2016 + + 2 7 2016 ) + + ( 200 8 2016 + 198 6 2016 + + 201 6 2016 ) ( 1 2016 + 2 2016 + + 9 2016 ) + ( 1 2016 + 2 2016 + + 9 2016 ) + ( 1 2016 + 2 2016 + + 9 2016 ) + + ( 1 2016 + 198 6 2016 + + 9 2016 ) 2016 9 ( 1 2016 + 2 2016 + + 8 2016 ) 224 ( 1 2016 + 2 2016 + + 8 2016 ) 224 ( 1 2016 m o d ϕ ( 9 ) + 2 2016 m o d ϕ ( 9 ) + 4 2016 m o d ϕ ( 9 ) + 5 2016 m o d ϕ ( 9 ) + 7 2016 m o d ϕ ( 9 ) + 8 2016 m o d ϕ ( 9 ) ) 224 × 6 3 \begin{aligned} &&1^{2016} + 2^{2016} +\cdots + 2016^{2016} \\ &=& \left( 1^{2016} + 2^{2016} + \cdots + 9^{2016} \right) \\ && + \left( 10^{2016} + 11^{2016} + \cdots + 18^{2016} \right) \\ && + \left( 19^{2016} + 20^{2016} + \cdots + 27^{2016} \right) \\ && + \cdots \\ && + \left( 2008^{2016} + 1986^{2016} + \cdots + 2016^{2016} \right) \\ &\equiv & \left( 1^{2016} + 2^{2016} + \cdots + 9^{2016} \right) \\ && + \left( 1^{2016} + 2^{2016} + \cdots +9^{2016} \right) \\ && + \left( 1^{2016} + 2^{2016} + \cdots + 9^{2016} \right) \\ && + \cdots \\ && + \left( 1^{2016} + 1986^{2016} + \cdots + 9^{2016} \right) \\ &\equiv & \dfrac{2016}9 \left( 1^{2016} + 2^{2016} + \cdots + 8^{2016} \right) \\ &\equiv & 224 \left( 1^{2016} + 2^{2016} + \cdots + 8^{2016} \right) \\ &\equiv & 224 \left( 1^{2016 \bmod{\phi(9)}} + 2^{2016 \bmod{\phi(9)}} + 4^{2016 \bmod{\phi(9)}} + 5^{2016 \bmod{\phi(9)}} + 7^{2016 \bmod{\phi(9)}} + 8^{2016 \bmod{\phi(9)}} \right) \\ &\equiv & 224 \times 6 \equiv 3 \end{aligned}

Writing these three linear congruences together, we have Z m o d 32 = 16 , Z m o d 7 = 6 , Z m o d 9 = 3 Z \bmod {32} = 16, Z \bmod7 = 6, Z \bmod 9 = 3 , or equivalently we want to find the smallest positive integer x x satisfying the following linear congruences:

x 16 ( m o d 32 ) x 6 ( m o d 7 ) x 3 ( m o d 9 ) \begin{aligned} x &\equiv& 16 \pmod{32} \\ x &\equiv& 6 \pmod{7} \\ x &\equiv& 3 \pmod{9} \end{aligned}

We can of course solve these linear congruences systematically by Chinese Remainder Theorem, but that isn't necessary because it's slightly tedious, notice that from these congruences, we have

x 16 , 48 , 80 , 112 , 144 , x 6 , 13 , 20 , 27 , 34 , 41 , 48 , x 3 , 12 , 21 , 30 , 39 , 48 , \begin{aligned} x &\equiv& 16, 48, 80, 112, 144, \ldots \\ x &\equiv& 6, 13, 20, 27, 34, 41, 48, \ldots \\ x &\equiv& 3, 12, 21, 30, 39, 48, \ldots \end{aligned}

And the smallest integer that appears in all these three rows is 48. Thus the smallest positive integer x x is 48, and so the answer to this question is 48 \boxed{48} as well.


Footnote : We can only apply euler's totient function for coprime a , n a,n such that a m m o d n = a m m o d ϕ ( n ) m o d n a^{m} \bmod n = a^{m \, \bmod{\phi (n)}} \bmod n can be true.

Nice solution, Comrade @Pi Han Goh

I wonder whether we can summarize your work as follows:

Modulo 32 , we have k 2016 0 k^{2016}\equiv 0 for even k k and k 2016 = ( k ϕ ( 32 ) ) 126 1 k^{2016}=(k^{\phi(32)})^{126}\equiv 1 for odd k k , by Euler, so that the sum is 1008 16 1008\equiv 16 .

Likewise, modulo 7 , we have k 2016 0 k^{2016}\equiv 0 for 7 k 7|k , and k 2016 = ( k ϕ ( 7 ) ) 336 1 k^{2016}=(k^{\phi(7)})^{336}\equiv 1 otherwise, so that the sum is 2016 2016 / 7 = 1728 6 2016-2016/7=1728\equiv 6 .

Finally, modulo 9 , we have k 2016 0 k^{2016}\equiv 0 for 3 k 3|k , and k 2016 = ( k ϕ ( 9 ) ) 336 1 k^{2016}=(k^{\phi(9)})^{336}\equiv 1 otherwise, so that the sum is 2016 2016 / 3 = 1344 3 2016-2016/3=1344\equiv 3 .

We can then use the Chinese Remainder Theorem to finish the job, as you did.

Otto Bretscher - 5 years, 3 months ago

Log in to reply

Sir,could you please refer a book so that I can improve my skills in Number Theory.

Ahmed K - 5 years, 3 months ago

Log in to reply

I mostly learned from Russian and German texts, so, I don't really know first hand. I hear that good undergraduate texts in English are by Apostol, Niven&Zuckerman and Ireland&Rosen. I love Serre's "Course in Arithmetic", but it's a bit more advanced; maybe suitable as a second text. Enjoy... it's a wonderful subject!

Otto Bretscher - 5 years, 3 months ago

Log in to reply

@Otto Bretscher Thanks for your help,sir.I will definitely buy these books.

Ahmed K - 5 years, 3 months ago

Log in to reply

@Ahmed K I would not buy all of them at once... read some reviews online and see which seems best suited for your needs.

Otto Bretscher - 5 years, 3 months ago

Log in to reply

@Otto Bretscher Well,I am a beginner in Number theory and have started practising it only a few months back.So,I shall buy a book that will strengthen my basic concepts.Thanks again sir.

Ahmed K - 5 years, 3 months ago

Log in to reply

@Ahmed K Maybe Niven/Zuckerman/Montgomery's "Introduction to the Theory of Numbers", published by Wiley (India), will be best as a first text in English

Otto Bretscher - 5 years, 3 months ago

Log in to reply

@Otto Bretscher Thanks sir.Then I shall buy the book you mentioned above.

Ahmed K - 5 years, 3 months ago

@Pi Han Goh can' t this question be done in this manner... if we divide 2015^2016 the remainder will be -1^2016..,, if we divide 2014^2016 then the remainder will be -2^2016 and so on which continues so forth and so on ..this is cancelling the terms from the starting.. so we now have only 1008^2016 which is well divisible by 2016 so shouldn"t be the answer 0... please correct..

Deepansh Jindal - 4 years, 11 months ago

Log in to reply

if we divide 2015^2016 the remainder will be -1^2016..,, if we divide 2014^2016 then the remainder will be -2^2016 and so on which continues so forth and so on ..this is cancelling the terms from the starting

I don't understand your logic and that doesn't work.

Pi Han Goh - 4 years, 11 months ago

Pay attention that -1^2016 = 1^2016 because the exponent is even ... Thus no cancellation.

Pierre Carrette - 3 years, 1 month ago

Nice work! My question is: a b ( m o d c ) a b m o d ϕ ( c ) ( m o d c ) ? \large a^b\pmod c\equiv a^{b\bmod \phi(c)} \pmod c?

A Former Brilliant Member - 9 months, 3 weeks ago

Log in to reply

This is only true when gcd ( a , c ) = 1 \gcd(a,c) = 1 . What's your question exactly?

Pi Han Goh - 9 months, 3 weeks ago

Log in to reply

Ok. Thank you! My question is where can I use this function?

A Former Brilliant Member - 9 months, 3 weeks ago

Log in to reply

@A Former Brilliant Member If you wanna compute the remainder of some large exponentiation, you can use this property. For example,

3 1000 m o d 14 = 3 1000 m o d ϕ ( 14 ) m o d 14 = 3 1000 m o d 6 m o d 14 = 3 4 m o d 14 = 11 3^{1000} \mod{14} = 3^{1000 \mod{\phi(14)}} \mod{14} = 3^{1000 \mod6} \mod{14} = 3^4 \mod{14} = 11

Pi Han Goh - 9 months, 3 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...