Solutions to aspects of this problem have been submitted by Coope (I am sorry I have no further details of your name), Ong Chin Wern and Adam Scrivens. I have used their solutions as the basis of what follows. Many thanks to each of you for your efforts and well done.

Since each row must add up to a prime number and the lowest number possible on any row, column or diagonal is 1+2+3 = 6, you can use the restriction that ll totals of rows and columns must be odd.

Using this information let us first consider the case for making horizontal and vertical sets prime. The restriction of 5 odd numbers means that to satisfy the conditions given above the following formation must be present:
1. One row contains 3 odd numbers, and the remaining 2, one odd number each.
2. One column contains 3 odd numbers, and the remaining 2, one odd number each.

Each condition requires 5 odd numbers, indicating that to satisfy both conditions using only 5 odd numbers, the two must overlap. This creates 2 possible general shapes: a T and an L (which are equivalent- see the problem Red Even). Both that can occur in 4 different rotations as shown below:

Diagrams as described above

These are the only configuration of odd numbers that will allow for the horizontal and vertical sets to possibly form primes. However if these cases are expanded to include the diagonal sets also the conditions defined above are no longer met. Both configurations have at least one diagonal containing 2 odd numbers. This makes it impossible for the diagonals to form primes.


Therefore it is not possible for the horizontal, vertical and diagonal sets to all form primes in a 3 by 3 grid using the numbers 1 to 9. The solutions for the horizontal and vertical totals being prime are given below.

2 8 3
4 6 9
7 5 1

2 8 3
6 4 9
5 7 1
2 8 9
6 4 3
5 7 1
2 8 9
4 6 3
7 5 1
All can be transformed to put 1 in centre and even nos. at corners
2 8 3
6 4 9
5 1 7
2 8 3
4 6 9
1 5 7
2 8 9
6 4 3
5 1 7
2 8 9
4 6 3
1 5 7
All can be transformed to put 7 in centre and evens nos. at corners
2 8 1
6 4 7
9 5 3
2 8 1
4 6 7
5 9 3
2 8 7
6 4 1
9 5 3
2 8 7
4 6 1
5 9 3
All can be transformed to put 3 in centre and evens nos. at corners
2 8 1
6 4 7
3 5 9
2 8 1
4 6 7
5 3 9
2 8 7
6 4 1
3 5 9
2 8 7
4 6 1
5 3 9
All can be transformed to put 9 in centre and evens nos. at corners