insideout Get Pro

08 · Number puzzles

Pro

Puzzles and Brainteasers, lesson 8

Number puzzles

Work out number puzzles in your head with remainders.

Number puzzles ask about things too big to work out in full: the last digit of a huge power, or how many zeros end a product of a hundred numbers. Remainders shrink them to sums you can do in your head. You need division with remainders, and the a mod n of the pigeonhole lesson.

Part 1. Last digits repeat

Find the last digit of a huge power from the cycle its last digits go round.

Guess first

What's the last digit of 7²⁰²⁶, read "7 to the power 2,026", which is 7 multiplied by itself 2,026 times?

9. The last digits of the powers of 7 repeat every four steps, as the example shows.

7²⁰²⁶ has over 1,700 digits, so nobody writes it out. But the last digit of a product depends only on the last digits of what you multiply. So follow the last digit alone.

Example 1.1

The last digit of 7²⁰²⁶

Find the last digit without working out the power.

  1. Follow the last digit7, 49, 343, 2,401

    The first four powers of 7 end in 7, 9, 3 and 1.

  2. Spot the cycle7 → 9 → 3 → 1 → 7

    After a 1, multiplying by 7 gives a 7 again, so the four repeat forever.

  3. Divide by the cycle's length2,026 = 4 × 506 + 2

    506 full turns bring you back to the start, and 2 steps are left over.

  4. Read the answerstep 2 of the cycle: 9

    Step 1 is 7, and step 2 is 9.

Answer7²⁰²⁶ ends in 9.

7931n mod 4 = 1n mod 4 = 2n mod 4 = 3n mod 4 = 02,026 = 4 × 506 + 2lands on 9
Figure 1The last digit of 7ⁿ goes round four steps. Divide n by 4 and the remainder picks the step; a remainder of 0 means a whole number of turns, which lands on the 1.

Working mod 10

A number's last digit is its remainder mod 10, and the last digit of a sum or product depends only on the last digits of its parts. Powers go round a cycle, so divide the power by the cycle's length and keep the remainder.

7ⁿ ends in 7, 9, 3, 1 when n mod 4 is 1, 2, 3, 0

Watch the remainder 0. It means a whole number of turns, so you land on the last step of the cycle, not the first: 7²⁰²⁴ ends in 1, not 7.

Your turn

What's the last digit of 8²⁰²⁸?

8, 64, 512 and 4,096 end in 8, 4, 2 and 6, a cycle of four. 2,028 = 4 × 507 leaves remainder 0, the end of a turn: 6. Answering 8 treats remainder 0 as the first step.

Part 2. Digit sums

Test for 3, 9 and 11 from a number's digits, and use the test to rule numbers out.

Keep going with Pro

You've done the first part. Pro opens the rest of this lesson, and every other one.

Still to come
  1. Digit sums
  2. Count the factors
  3. Add by pairing

Puzzles and Brainteasers overviewSpotted a mistake? Tell us.