#### Problem Description

Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
21 22 23 24 25

20 7 8 9 10

19 6 1 2 11

18 5 4 3 12

17 16 15 14 13

It can be verified that the sum of both diagonals is 101.20 7 8 9 10

19 6 1 2 11

18 5 4 3 12

17 16 15 14 13

What is the sum of both diagonals in a 1001 by 1001 spiral formed in the same way?

#### Analysis

The “corners” which form the two principal diagonals produce a simple series: (3, 5, 7, 9), (13, 17, 21, 25), (31, 37, 43, 49), …You can answer this problem by adding the corners with odd numbered side lengths,

*n*, from 3 through 1001 and adding 1 for the center.

The four corners form another series when added together: 3 + 5 + 7 + 9 =

**24**, 13 + 17 + 21 + 25 =

**76**, 31 + 37 + 43 + 49 =

**160**, … for odd

*n*> 2 is 4

*n*

^{2}− 6

*n*+ 6.

You could even take this one step further and summarize the sum for both diagonals based on the length of a side (L) in one equation, where

.

## Comments

## Post a Comment