The question is to evaluate the sum of the digits inside a square of this type.

```
6 5 4 3 4 5 6
5 4 3 2 3 4 5
4 3 2 1 2 3 4
3 2 1 0 1 2 3
4 3 2 1 2 3 4
5 4 3 2 3 4 5
6 5 4 3 4 5 6
```

The square size increases as 3x3 5x5 7x7 and so on

Eg :

Sum of first square is 12

Sum of second square is 60

I was able to find a linear solution to this (the sum of a specific square), but is there a constant or anything less than O(n) that can be used to evaluate the required sum.