Javascript required
Skip to content Skip to sidebar Skip to footer

What Is Negative 5 to the 2nd Power

A common way to attack these type of questions is to list out the initial expansions of a power to determine a pattern. Questions which ask about the last decimal digit of a power can be solved completely after proving that the pattern in question holds (often by induction). The last digits of various powers of an integer are given in the table below:

digit d d 2 d 3 d 4 d 5 1 1 1 1 1 2 4 8 6 2 3 9 7 1 3 4 6 4 6 4 5 5 5 5 5 6 6 6 6 6 7 9 3 1 7 8 4 2 6 8 9 1 9 1 9 \begin{array} { c | c c c c } \text{digit } d & d^2 & d^3 & d ^ 4 & d^ 5\\ \hline 1 & 1 & 1 & 1 & 1 \\ 2 & 4 & 8 & 6 & 2 \\ 3 & 9 & 7 & 1 & 3 \\ 4 & 6 & 4 & 6 & 4 \\ 5 & 5 & 5 & 5 & 5 \\ 6 & 6 & 6 & 6 & 6 \\ 7 & 9 & 3 & 1 & 7 \\ 8 & 4 & 2 & 6 & 8 \\ 9 & 1 & 9 & 1 & 9 \\ \end{array} From the table,we can see the following:

The last digit of powers of 1 is always 1 The last digits of powers of 2 repeat in a cycle of 4 , 8 , 6 , 2 The last digits of powers of 3 repeat in a cycle of 9 , 7 , 1 , 3 The last digits of powers of 4 repeat in a cycle of 6 , 4 The last digit of powers of 5 is always 5 The last digit of powers of 6 is always 6 The last digits of powers of 7 repeat in a cycle of 9 , 3 , 1 , 7 The last digits of powers of 8 repeat in a cycle of 4 , 2 , 6 , 8 The last digits of powers of 9 repeat in a cycle of 1 , 9 \begin{array} {|c|c|} \hline \text{The last digit of powers of 1 is always} & 1\\ \hline \text{The last digits of powers of 2 repeat in a cycle of} & 4,8,6,2\\ \hline \text{The last digits of powers of 3 repeat in a cycle of} & 9,7,1,3\\ \hline \text{The last digits of powers of 4 repeat in a cycle of} & 6,4\\ \hline \text{The last digit of powers of 5 is always} & 5\\ \hline \text{The last digit of powers of 6 is always} & 6\\ \hline \text{The last digits of powers of 7 repeat in a cycle of} & 9,3,1,7\\ \hline \text{The last digits of powers of 8 repeat in a cycle of} & 4,2,6,8\\ \hline \text{The last digits of powers of 9 repeat in a cycle of} &1,9\\ \hline \end{array}

The set of last digits of powers forms a periodic sequence with periods given by the table below:

Digit Period 0 , 1 , 5 , 6 1 2 , 3 , 7 , 8 4 4 , 9 2 \begin{array} { c | c } \text{Digit } & \text{Period}\\ \hline 0,1,5,6 & 1 \\ 2,3,7,8 & 4 \\ 4,9 & 2 \\ \end{array}

Find the last digit of 7 358 7^{358} .


Notice the pattern of the last digits. They are 7 , 9 , 3 , 1 , 7 , 9 , 3 , 1 , 7 , 9 , 7,9,3,1,7,9,3,1,7,9,\ldots . The last digit repeats in a pattern that is 4 digits long: 7 , 9 , 3 , 1 7,9,3,1 .

Note that 358 358 divided by 4 4 is 89 89 with a remainder of 2 , 2, so the pattern will repeat 89 89 times, with two extra entries at the end. These last two entries are 7 7 and 9 , 9, so the last digit of 7 358 7^{358}  is 9 9 . _\square

Find the last digit of 2 2016 2^{2016} .


The last digit of the powers of 2 2 repeat in a cycle of 2 , 4 , 8 , 6 , 2 , 4 , 8 , 6 , 2,4,8,6,2,4,8,6,\ldots . Dividing 2016 2016 by 4 , 4, we get 504 504 as the quotient with 0 0 as the remainder. Therefore, the sequence of digits repeats 504 504 times with no extra entries, so the last digit should be 6 6 . _\square

What is the last digit of 2 9 ? 2^9?

How many digits D D (0-9 inclusive) satisfy the following property?

For each positive integer N N , the remainder when D N D^N is divided by 10 is constant.

Consider a number 3 n , 3^n, where n n is a positive integer.

If n = 2016 n=2016 , the last digit of 3 n 3^n is a a .
If n = 9018 n=9018 , the last digit of 3 n 3^n is b b .

What is a + b ? a+b?

Main article: Modular Arithmetic

The patterns of the previous section can be expressed elegantly in the language of modular arithmetic. Finding the last digit of a positive integer is the same as finding the remainder of that number when divided by 10 10 . In general, the last digit of a power in base n n is its remainder upon division by n n . For decimal numbers, we compute m o d 10 \bmod~{10} . Finding the last 2 digits of an integer amounts to computing it mod 100 , 100, and finding the last n {n} digits amounts to computation m o d 1 0 n \bmod~10^{n} .

Find the last digit of 1 7 17 . 17^{17}.


Compute some powers of 17 17 mod 10 10 :

1 7 2 7 2 9 ( m o d 10 ) , 17^2\equiv 7^2 \equiv 9 \pmod{10},

so

1 7 4 9 2 1 ( m o d 10 ) . 17^4 \equiv 9^2 \equiv 1 \pmod{10}.

Therefore, 1 7 17 = ( 1 7 4 ) 4 × 17 17^{17} = \big(17^4\big)^{4}\times 17 and

1 7 17 ( 1 7 4 ) 4 × 17 ( m o d 10 ) 1 4 × 17 ( m o d 10 ) 7 ( m o d 10 ) . \begin{aligned} 17^{17}&\equiv \big(17^4\big)^{4}\times 17\pmod{10}\\ &\equiv 1^4\times 17\pmod{10}\\ &\equiv 7 \pmod{10}.\ _\square \end{aligned}

n ¡ = n ( n 1 ) ( n 2 ) . . . 2 1 \LARGE n¡=n^{{(n-1)}^{{(n-2)}^{.^{.^{.^{2^{\small1}}}}}}}

If n ¡ is defined as above, what are the last two digits of the number 2018 ¡ ? 2018¡?

Note: ¡ \large ¡ is the factorial notation ! ! turned upside down. Note that ¡ \large ¡ keeps exponentiating while ! ! keeps multiplying.

Find the last digit of 2 35 2^{35} .

The Chinese remainder theorem is a powerful tool to find the last few digits of a power. The idea is to find a number mod 5 n 5^n and mod 2 n , 2^n, and then combine those results, using the Chinese remainder theorem, to find that number mod 1 0 n 10^n .

Find the last two digits of 7 4 540 74^{540} .


Observe that 100 = 4 × 25 100=4\times 25 and gcd ( 4 , 25 ) = 1 \text{gcd}(4,25)=1 . So we can compute 7 4 540 74^{540} (mod 4) and 7 4 540 74^{540} (mod 25), and then combine those results to find 7 4 540 74^{540} mod 100. Now

7 4 540 2 540 × 3 7 540 0 ( m o d 4 ) 7 4 540 ( 1 ) 540 1 ( m o d 25 ) . \begin{aligned} 74^{540}\equiv 2^{540}\times 37^{540}& \equiv 0 \pmod{4}\\ 74^{540}\equiv (-1)^{540}&\equiv 1\pmod{25}. \end{aligned}

The unique solution mod 100 100 to x 0 ( m o d 4 ) x\equiv 0 \pmod 4 and x 1 ( m o d 25 ) x\equiv 1 \pmod{25} is 76 , 76, so this is the answer. _\square

Large exponents can be reduced by using Euler's theorem: if gcd ( a , n ) = 1 \gcd(a,n) = 1 and ϕ ( n ) \phi(n) denotes Euler's totient function, then

a ϕ ( n ) 1 ( m o d n ) . a^{\phi (n)}\equiv 1 \pmod{n}.

So an exponent b b can be reduced modulo ϕ ( n ) \phi(n) to a smaller exponent without changing the value of a b ( m o d n ) . a^b\pmod n.

Find the last two digits of 3 3 42 . 33^{42}.


Since ϕ ( 100 ) = 40 \phi(100)=40 and 3 3 40 1 ( m o d 100 ) , 33^{40} \equiv 1\pmod{100}, it follows that 3 3 42 3 3 2 ( m o d 100 ) , 33^{42}\equiv 33^2 \pmod{100}, which is easier to compute: 3 3 2 = 1089 , 33^2 = 1089, so the answer is 89. 89. _\square

Find the last three digits of 4 2 42 . 4^{2^{42}}.


This number is 0 ( m o d 2 3 ) , 0\pmod{2^3}, and mod 5 3 5^3 it depends on the exponent mod ϕ ( 5 3 ) = 100. \phi(5^3) = 100. Now 2 42 2 2 4 ( m o d 100 ) 2^{42} \equiv 2^2 \equiv 4 \pmod{100} by Euler's theorem again, so we get 4 4 = 256 6 ( m o d 125 ) . 4^4 =256 \equiv 6\pmod{125}.

Using the Chinese remainder theorem, there is a unique number mod 1000 1000 that is congruent to 0 ( m o d 8 ) 0\pmod{8} and 6 ( m o d 125 ) , 6\pmod{125}, namely 256. 256. _\square

6 6 6 6 6 6 \Huge 6^{6^{6^{6^{6^6}}}}

Find the 6 th 6^\text{th} last digit from the right of the decimal representation of the above number.

11 11 11 \large \color{#3D99F6}{11}^{\color{#624F41}{11}^{\color{#20A900}{11}}}

What are the last two digits of the number above?


Bonus 1: Can you generalize this for 1 1 1 1 1 1 . . . 11  number of 11 's = n ? \underbrace{11^{11^{11^{.^{.^.{11}}}}} }_{\text{ number of } 11\text{'s }=\, n}?

Bonus 2: Try not to use Euler's totient function.

2 3 4 5 6 \Huge {\color{crimson}{2}}^{{\color{#20A900}{3}}^{{\color{maroon}{4}}^{{\color{#624F41}{5}}^{\color{#3D99F6}{6}}}}}

What are the last three digits of the number above?

Another approach (similar to computations involving Hensel's lemma) is to expand the power using the binomial theorem, in such a way that many of the terms vanish modulo powers of 10. 10. This can occasionally be useful for simplification, but it generally only helps dramatically when the base of the exponent is of the form 10 k ± 1. 10k\pm 1.

Find the last 2 digits of 3 1 25 31^{25} by using binomial expansion.


We have

3 1 25 = ( 1 + 30 ) 25 = 1 25 + ( 25 1 ) × 1 24 × 30 + ( 25 2 ) × 1 23 × 3 0 2 + + ( 25 25 ) × 3 0 25 . 31^{25} = (1+30)^{25}= 1^{25} + \dbinom{25}{1}\times 1^{24} \times 30 +\dbinom{25}{2}\times 1^{23} \times 30^2+ \cdots + \dbinom{25}{25} \times 30^{25}.

Notice that after the second term every term contains at least 2 zeroes. Hence, every term after the second term is divisible by 100 100 .

For the first two terms,

1 + 25 × 30 = 751 51 ( m o d 100 ) . 1+25\times 30=751 \equiv 51 \pmod{100}.

So the last 2 2 digits of 3 1 25 31^{25} are 51 51 . _\square

Find the last two digits of 8 9 47 89^{47} .

M = ( 99 × 1 0 11 + 1 ) 987654321 \large M=\big(99\times10^{11}+1\big)^{987654321}

What is the sum of last 22 digits of M ? M?

Consider the following problem: what is 11 7 1023 ( m o d 229 ) ? 117^{1023} \pmod{229}? Euler's theorem allows us to reduce the exponent somewhat: since 229 229 is prime, ϕ ( 229 ) = 228 , \phi(229)=228, so 11 7 1023 11 7 111 ( m o d 229 ) . 117^{1023} \equiv 117^{111} \pmod{229}. This still seems to be a difficult computation.

In cases like these, repeated squaring is often the easiest way to do the required computation. Suppose we want to evaluate x a ( m o d n ) x^a \pmod{n} . Clearly a a has a unique base-2 expansion ( a 1 a 2 a k ) 2 , (a_1 a_2 \cdots a_k)_2, where a i = 0 , 1 a_i =0,1 . We can use this fact to decompose the congruence into easier ones:

x a x ( a 1 a 2 a k ) 2 a i 0 x 2 k i ( m o d n ) . x^a \equiv x^{(a_1 a_2 \cdots a_k)_2} \equiv \prod_{a_i \neq 0}^{}{x^{2^{k-i}}} \pmod{n}.

Now make a table of x 2 i , x^{2^i}, where i k i\le k . This will only take log 2 ( a ) \big\lfloor\log_2(a)\big\rfloor computations, making this strategy far more efficient once you plug in these values into the product.

In the example, 111 = 2 6 + 2 5 + 2 3 + 2 2 + 2 1 + 2 0 . 111 = 2^6+2^5+2^3+2^2+2^1+2^0. Some quick squaring gives

11 7 1 117 11 7 2 178 11 7 4 82 11 7 8 83 11 7 16 19 11 7 32 132 11 7 64 20. \begin{aligned} 117^1 &\equiv 117 \\ 117^2 &\equiv 178 \\ 117^4 &\equiv 82 \\ 117^8 &\equiv 83 \\ 117^{16} &\equiv 19 \\ 117^{32} &\equiv 132 \\ 117^{64} &\equiv 20. \end{aligned}

So the answer is 117 178 82 83 132 20 ( m o d 229 ) , 117 \cdot 178 \cdot 82 \cdot 83 \cdot 132 \cdot 20 \pmod{229}, which works out to 141. 141.

What are the last 3 digits of

12 3 456 ? 123 ^ { 456 } ?

Find the last 4 digits of the decimal representation of

144 4 14 4 4 . \Large 1444^{144^4}.

2 5 1 25 ( m o d 1000 ) 2 5 2 625 ( m o d 1000 ) 2 5 3 625 ( m o d 1000 ) 2 5 4 625 ( m o d 1000 ) \begin{array} { c c c } 25 ^ 1 & \equiv 25 & \pmod{1000} \\ 25 ^ 2 & \equiv 625 & \pmod{1000} \\ 25 ^ 3 & \equiv 625 & \pmod{1000} \\ 25 ^ 4 & \equiv 625 & \pmod{1000} \\ \vdots & \vdots & \vdots \\ \end{array}

We know that the last 3 digits of 2 5 n 25 ^ n will always be a constant 625 for large enough integer values of n n .

What is the smallest positive integer value a a such that the last 5 digits of ( 5 a ) n \left( 5 ^ a \right) ^n will always be a constant for large enough integer values of n ? n?

Find the last two digits of

255575 9 832 . 2555759^{832}.

Find the last 6 digits in decimal representation of

29999 9 29999 2999 299 29 2 . \Large 299999^{{29999}^{{2999}^{{299}^{{29}^2}}}}.

  • Primitive Roots

  • RSA Encryption

  • Euler's Totient Function

What Is Negative 5 to the 2nd Power

Source: https://brilliant.org/wiki/finding-the-last-digit-of-a-power/