Answer: 831. Solution. Subtract 2015 from all numbers - the sums will remain the same, and the numbers in the table will take on values of 0 and $\pm 1$. Consider the 27 possible combinations of numbers in one row. Possible values of the sum of these numbers: $\pm 3$ - 1 combination each, $\pm 2$ - 3 combinations each, $\pm 1$ - 6 combinations each, $0-7$ combinations. Then the arrangement specified in the condition can be made in $2 \cdot 1^{3}+2 \cdot 3^{3}+2 \cdot 6^{3}+7^{3}=$ 831 ways.
3. A $3 \times 3$ table needs to be filled with the numbers 2014, 2015, and 2016, such that the sum of the numbers in each row is the same. In how many different ways can this be done?