l*******l 发帖数: 248 | 1 Build a n-by-n box (n odd) where the numbers 1,2,3,4,5 ect spiral out from
the center square of the box. (i.e. a 3 by 3 box will have 3,5,7 and 9 in
the corners; a 5 by 5 box will have 13,17,21 and 25 in the corners) What is
the sum of the four corners for each n? | n*******r 发帖数: 22 | 2 brutal force死算 :)
n^2 + (n^2 - (n - 1)) + (n^2 - 2 * (n - 1)) + (n^3 - 3 * (n - 1)) = 4 *
n^2 - 6 * (n - 1)
from
in
What is
【在 l*******l 的大作中提到】 : Build a n-by-n box (n odd) where the numbers 1,2,3,4,5 ect spiral out from : the center square of the box. (i.e. a 3 by 3 box will have 3,5,7 and 9 in : the corners; a 5 by 5 box will have 13,17,21 and 25 in the corners) What is : the sum of the four corners for each n?
|
|