Solution

26545

First name
Saleem Akhtar
School
Farnborough Sixth Form
Country
Age
16

Firstly we can identify certain rules the pattern is following by looking at which direction the line is moving with respect to its X and Y co-ordinates:
1. When the X co-ordinate is odd and the Y co-ordinate is even, then the next point will be (X+1, Y-1)
2. When the X co-ordinate is odd (and not 1) and the Y co-ordinate is odd, then the next point will be (X-1, Y+1)
3. When the X co-ordinate is even and the Y co-ordinate is even, then the next point will be (X-1, Y+1)
4. When the X co-ordinate is even and the Y co-ordinate is odd, then the next point will be (X+1, Y-1)
5. When the X co-ordinate is 1 and the Y co-ordinate is odd, then the next point is (X, Y+1)

(Please refer to the Excel spreadsheet for a more concise view of the above rules)

Using these rules we can answer the first question: 'If the pattern of arrows continues for ever, which point will the route visit immediately after (18,17)?'

18 is the X co-ordinate and is even. 17 is the Y co-ordinate and is odd. This means the next co-ordinate will be (X+1, Y-1), so it will be (19, 16)

For the second question, we need to identify an nth term of how many points have been visited for every Y value on the line X = a. In my case, I have decided to use the line X = 1.

(Please refer to the Excel spreadsheet to see the amount of points visited at every y value on the line X = 1)

You can immediately see that for every even Y value, the amount of points visited was just 1 higher than the previous odd Y value. This would make finding the nth term for the series very difficult, so I decided to consider the even Y values and odd Y values as 2 separate series.

I would firstly find the nth term for every odd Y value. This would enable me to add a '+ 1' to the nth term to find the nth term for even Y values.

I calculated the 'differences' and 'second differences' (please refer to my excel spreadsheet) and then used the following formula to find the nth term:

nth term = a + (n - 1)d + ½(n - 1)(n - 2)c

Definitions:
a = first number
n = undefined - used to locate value for the nth term
d = difference between 1st term and 2nd term
c = constant second difference

This gave me:
a = 1
n = undefined
d = 5
c = 4

nth term = 1 + ((n - 1) * 5) + (0.5 * (n - 1) * (n - 2) * 4)
nth term = 1 + 5n - 5 + (2 * (n - 1) * (n - 2))
nth term = 1 + 5n - 5 + 2n^2 - 6n + 4
nth term = 2n^2 - n

nth term for odd values of Y : 2n^2 - n
nth term for even values of Y: 2n^2 - n + 1

Now, with the use of both the rules and the nth terms, we can answer question 2: 'How many points will be visited before the route reaches the point (9,4)?'

9 is odd and 4 is even, which means the next point is (10, 3) and that the line is moving down-right with every iteration of x. Since we can figure out how many points have been visited at every Y value of the line X = 1, we need to figure out 2 things: the last Y value the line has visited AND the amount of points have been visited since then to get to (9, 4). We can then add these 2 values and find how many points have been visited.

Since we know the line is going down-right, we must travel up-left to get to the line X = 1 to find the Y value to input into one of our nth terms.
Here is the process of finding the Y value:

X = 9, Y = 4
To find point Y when X = 1, we must do 'Y = Y + (X - 1)' (which is effectively travelling up-left until we reach the line X = 1)
So Y = 4 + (9 - 1)
Hence Y = 12

The Y value is 12 and we have travelled 8 points since then.
Since the Y value is even, we must use the nth term '2n^2 - n + 1'
Inputting 12 as n gives: 2*12^2 - 12 + 1
The answer is: 277
However, we must now add 8 since we have visited 8 points since then.
The final answer is: 285 points