Logic with numbers Nick wrote each of the numbers from 1 to 9 in the cells of the 3x3 table below. Only 4 of the numbers can be seen in the figure. Nick noticed that for the number 5, the sum of the numbers in the neighboring cells is equal to 13 (neighboring cells are cells that share a side). He noticed that the same is also true for the number 6. Which number did Nick write in the shaded cell?


The number in the middle, shaded square abuts four numbers whose sum is at least $5+6+7+8=26$, so cannot be either the $5$ or the $6$.  Hence the $5$ and $6$ each go in a side square, abutting whatever's in the middle and two corner squares.  Since the total abutting sums both equal $13$, the corner abutting sums for the $5$ and $6$ must be equal.  This only happens for the corner sums $1+4$ and $2+3$ (implying the $5$ and $6$ occupy the sides squares on the left and right, in some order), which means the middle, shaded square contains the $8$.
