# Robert's spreadsheet

Robert noticed some interesting patterns when he highlighted square
numbers in a spreadsheet. Can you prove that the patterns will
continue?

Robert made a spreadsheet with eight columns. He arranged the numbers from 1 to 1000 in his spreadsheet, and then coloured in all the square numbers.

Here is a picture showing the first few rows of Robert's spreadsheet:

Image

Robert noticed some interesting patterns beginning to emerge.

Why not create your own copy of Robert's spreadsheet and see what patterns you notice?

Can you explain the patterns you find?

Will the patterns continue? How can you be sure?

Can you predict where $29^2$ will appear? Or $34^2$? Or $52^2$?

Where are the odd square numbers?

Are there diagrams that could help you to show what happens when you square an odd number (or an even number)?

By representing an odd number as $2n+1$, can you explain any of the patterns in the odd square numbers?

Adithya from Lexden Primary School noted that there is a pattern to the gap between square numbers, with the gap increasing by two each time. Adithya also noticed a pattern in column A; this was also spotted by James from Wilson's School, Niteesh from Vidyashilp Academy, Dan and Linden from Wilson's School, and James from Eltham College. Here is a picture of Linden's spreadsheet showing the pattern:

Image

Krystof from Uhelny Trh, Prague, made some comments about which squares appear in each column:

Column A contains squares of odd numbers. Column D contains squares of even numbers which are not divisible by four. Column H contains squares of multiples of four.

An anonymous solver sent us these thoughts:

Firstly I noticed that all of the squares of odd numbers were in the left-hand column, column A. All of the squares of even multiples of 4 were in the right-hand column, column H, while all of the squares of other even numbers are in column D.

I can explain these by saying that the squares of multiples of $4$ are always multiples of $8$. The squares of any other even numbers are always multiples of $4$, while the squares of odd numbers do not all have a common factor and therfore are only divisble by one.

I noticed that the final digit of the odd squares was always $1$, $5$ or $9$ and for the even squares always $4$, $6$ or $0$. I also noticed that the first square number was in column A, then the second in column D, the third back in column A and the fourth in column H. I also noticed that in column A, which has the squares of odd numbers, the rows between the squares increases by $1$ every time, for example there are $0$ rows between $1$ and $9$, $1$ row between $9$ and $25$, $2$ rows between $25$ and $49$ etcetera. This therefore tells me that the difference between odd numbers is also always a multiple of $8$.

I can also see that when each odd square is represented in the form $2n+1$ $n$ is always a multiple of $4$ ($2\times4+1=9, 2\times40+1=81$ etc.) I can use examples to demonstrate this, for example $13\times13=169$ which not only ends in $9$ but is also $2\times84+1$, and $84$ is a multiple of $4$. Not only this, the difference between $169$ and the previous odd square is $48$, which is a multiple of $8$, just like the pattern suggested. The patterns also work for the next square numbers, i.e. $14\times14=196$ and $15\times15=225$.

Lots of fantastic ideas - can it be proved that these patterns will continue?

Herschel from the European School of Varese, and Simon who didn't give his school both sent us algebraic explanations for some of the patterns. Here is Herschel's solution:

The square numbers show a definite pattern:

$1^2=1$ is in column A.

$2^2=4$ is in column D.

$3^2=9$ is in column A.

$4^2=16$ is in column H.

This pattern (A,D,A,H) repeats itself throughout the series, albeit with larger gaps (blank rows) as the numbers increase.

This can be proven algebraically:

Suppose we call $n$ any multiple of $4$ We can write any whole number as either $n$, $n+1$, $n+2$ or $n+3$. Since $n$ is a multiple of $4$, we can re-write $n$ as $4a$, so that all whole numbers are either $4a$, $4a+1$, $4a+2$ or $4a+3$.

$(4a)^2 = 16a^2$, which is $8\times(2a^2)$, so it is a multiple of $8$ and hence appears in column H.

$(4a+1)^2 = 16a^2+8a+1$ which is $8\times(2a^2+a) + 1$, so it is $1$ more than a multiple of $8$ and hence appears in column A.

$(4a+2)^2 = 16a^2+16a+4$ which is $8\times(2a^2+2a) + 4$, so it is $4$ more than a multiple of $8$ and hence appears in column D.

$(4a+3)^2 = 16a^2+24a+9$ which is $8\times(2a^2+3a+1) + 1$, so it is $1$ more than a multiple of $8$ and hence appears in column A.

After $4a+3$, the next number is $4a+4$ which is $4(a+1)$, so we increase $a$ by $1$ and continue the trend. This means the pattern of highlighted squares is H,A,D,A (or A,D,A,H since we ignore $0^2=0$) and this continues forever.

Well done to all those who submitted solutions!

### Why do this problem?

This problem offers the opportunity to explore sequences generated by square numbers, which in turn can offer practice in algebraic manipulation or geometric representations to explain results. Central to the task is the idea of making and proving conjectures, and the open nature of the task offers lots of potential lines of enquiry.### Possible approach

Show the picture of Robert's spreadsheet, or if computers are
available ask learners to create it for themselves. Give them time
to discuss in pairs any patterns they notice or any interesting
questions that occur to them. Then bring the class together to
share things they've noticed, and collect together all questions
and conjectures on the board.

Possible lines of enquiry might be:

- Will square numbers only appear in columns A, D and H?
- Does the pattern of the odd squares in column A continue?
- Will the sequence continue to alternate from column A to D to A to H?

and so on.

Suggest that each pair chooses a conjecture or question that
interests them, and then allow them time to explore. Stop the class
while they are working, when appropriate, for mini-plenaries to
share what people are working on, and to suggest ways of using
algebra or geometric representations to start to justify
conjectures. Learners could be given some numerical challenges:
"Can you explain where $29^2$ will appear? Or $34^2$? Or
$52^2$?"

Towards the end of the session, bring the class back together
to share what they have been working on and to demonstrate their
convincing arguments or explanations for what they have found
out.

### Key questions

What patterns do you notice?

Will the patterns continue?

Can you prove it?

### Possible extension

Explore what happens when square numbers are highlighted on
different grids.

Some of the patterns can be explained using modular
arithmetic, so reading this article may
be helpful.

### Possible support

Start with a spreadsheet with four columns to investigate
patterns in odd and even square numbers and their relationship to
multiples of four.

The problem Remainders looks
at properties of numbers based on remainders, and might be a useful
introduction.