7. Margot writes the numbers $1,2,3,4,5,6,7$ and 8 in the top row of a table, as shown. In the second row she plans to write the same set of numbers, in any order.
Each number in the third row is obtained by finding the sum of the two numbers above it. In how many different ways can Margot complete row 2 so that every entry in row 3 is even?
Solution
576

For an entry in row 3 to be even we need the corresponding entry in row 2 to have the same parity as the entry in row 1 (that is: both are odd or both are even). Columns $1,3,5$ and 7 must therefore have odd entries in row 2 . There are four odd numbers to arrange in these cells, with $4 \times 3 \times 2 \times 1=24$ ways to arrange these. Similarly, columns $2,4,6$ and 8 must have even entries in row 2 . There are four even numbers to arrange in these cells, with $4 \times 3 \times 2 \times 1=24$ ways to arrange these.
Therefore there are $24 \times 24=576$ ways in which Margot can complete the table in this way.