Quoto

Learn / Library / Brainteasers

Tail of a huge power

BrainteasersMedium

What are the last digits of , written as a number from to ?

Checking an answer needs JavaScript. The hint and the solution open without it.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

Square repeatedly modulo and look for the exponent at which the power returns to .

Solution
  1. Modulo we have , , and .
  2. Then , so the powers of repeat with period dividing .
  3. Since , we get modulo .
  4. The last digits are .

Answer: