This brainteaser was written by Derrick Niederman. A prime number is a natural number greater than 1 whose only factors are 1 and itself. Can you place the digits 1–9 into the nine boxes below (one digit per box) so that the sum of every row and every column is a prime number? What if the prime sums for each row and column have to be different? Resources for Teaching Math © 2009 National Council of Teachers of Mathematics, Inc. http://illuminations.nctm.org Solution: This problem has many different solutions one of which is provided below, with the sums to the right of and below their respective rows and columns: 3 6 2 11 5 4 8 17 9 1 7 17 17 11 17 The solution above may be unsatisfying, because the six sums produce only two distinct primes. It’s possible to get more distinct primes, as follows: 1 2 4 7 7 9 3 17 5 8 6 17 13 19 13 However, it is impossible to make all six prime sums distinct. When you take three digits from {1, 2, 3, 4, 5, 6, 7, 8, 9}, the smallest possible sum is 1 + 2 + 3 = 6, and the largest possible sum is 7 + 8 + 9 = 24. Therefore, the only primes possible as a sum of a row or column must be the ones between 6 and 24, namely {7, 11, 13, 17, 19, 23}. Because six distinct numbers are required, the sums must be precisely these six primes. But the only way to generate 7 is through the sum 1 + 2 + 4, and the only way to generate 23 is through 6 + 8 + 9, so these numbers must form two distinct rows or columns, something like the following: 1 2 4 6 8 9 Alas, our valiant effort now comes to an end! There’s no use trying to place the three remaining numbers into the grid to form prime rows, because the remaining numbers are 3, 5, and 7, whose sum is 15. The sum of the middle row will therefore not be a prime number, so an arrangement with six distinct prime sums is impossible. Resources for Teaching Math © 2009 National Council of Teachers of Mathematics, Inc. http://illuminations.nctm.org