=== by Bob Sutherland ===

This is the answer page for A Quick Computer Skills Aptitude Test.

You were asked to find the patterns in the following sequence of numbers paying special attention to when the patterns change.

The answers appear below the list of numbers.

## Powers of 2

There is more than one correct answer to this test. If I were to ask students working together in groups in a classroom what patterns they see in this list of numbers the students would probably come up with a few different patterns that they can spot and explain to each other.

One pattern that I teach students to look for is the last digit of each number. If you ignore the first line 20=1 but start at the second line 21=2 then there is a repeating pattern of 2, 4, 8, 6, 2, 4, 8, 6 … for the last digit on each line as you go down the list.

The repeating pattern of 2, 4, 8, 6, 2, 4, 8, 6 … for the last digit of the numbers is an indication that we have a healthy sequence of numbers. For some reason the first line was abnormal but we can ignore that. What we cannot ignore is the line 255=36028797018963970 where the last digit of the number suddenly becomes a zero. Our 2, 4, 8, 6, 2, 4, 8, 6 … pattern has been broken.

For the next few lines the number of zeros at the end of each number start to increase from one zero at the end of 255=36028797018963970 to five zeros at the end of 269=590295810358705700000. This is our second pattern but what is happening here? Well since this is a rapidly increasing sequence of numbers one possibility that we have to consider is that the numbers have grown too big for the computer to handle.

If we were to calculate a few of the values using a pencil, paper and our brains we would find that:

Calculated by personCalculated by computerWhat happened?
2541801439850948198418014398509481984numbers are the same
2553602879701896396836028797018963970last digit rounded off
2567205759403792793672057594037927940last digit rounded off
257144115188075855872144115188075855870last digit rounded off
258288230376151711744288230376151711740last digit rounded off
259576460752303423488576460752303423500last 2 digits rounded off
26011529215046068469761152921504606847000last 3 digits rounded off
26123058430092136939522305843009213694000last 3 digits rounded off

The numbers have grown too big for the computer to handle and are being rounded off. This means that the values our JavaScript program is calculating are no longer precise integer numbers but rather have become rounded off numbers. Since the calculation for each line starts with the number from the line above the values that are being calculated by the computer for the Powers of 2 chart are becoming less precise as we go down the list.

In real life the loss of precision as larger values for the Powers of 2 list are being calculated may not matter if you are an engineer building a bridge. As you build the bridge you may be rounding the numbers off anyways whenever you try to measure using your ruler or tape measure. But you need to be aware that the numbers are being rounded off just in case it does matter in your drawings and measurements.

While a bridge may not collapse because the builders used rounded off numbers in their calculations and measurements the situation may be different out in space. A rocket could miss a distant planet if the numbers are not precise in calculations of trajectory and gravity.

The third pattern in the number sequence is easy to spot because the letter e suddenly begins appearing in each number. The letter e in this case is not meant by the computer to be an error message but rather an indication that scientific notation is now being used to print out the numbers. The letter e marks the beginning of the exponent for a power of 10.

For a quick review of scientific notation see

When a computer suddenly switches on its own without human input from integer numbers to scientific notation that is a sure indication that the numbers in our Powers of 2 list have grown too big for the computer to store in its memory as integer numbers. By definition scientific notation is used to represent rounded off, floating point real numbers rather than precise integer numbers. For our Powers of 2 list this means that the computer is now giving us approximate answers rather than exact answers when it starts using scientific notation in the sequence of answers.

Congratulations if you were able to identify and explain the three patterns in the Powers of 2 list. Since the list is a sequence of numbers it is quite possible that you found other patterns that are just as valid as my answers. What is important is that you learn to spot the patterns in the output created by computers. You need to be able to recognize the difference between a healthy sequence and a pattern that may indicate an error is happening in the computer calculations.