5 | 7 | 11 | 13 |
---|---|---|---|
101 | 103 | 107 | 109 |
191 | 193 | 197 | 199 |
821 | 823 | 827 | 829 |
The above 4 * 4 square matrix is different from each other, and the sum of all four cells is 1134. Example: 5+103+197+829=1134 101+7+827+199=1134
In this question, a quaternary square matrix for which the calculation "the total values of all four cells with different matrices are the same" is called "4 queen squares".
bonus. 4. Is there an infinite number of 4 queen squares consisting of 16 different prime numbers? Prove it.
Originally, it seems that it was a math quiz for children, but I dared to make it like a programming problem for newcomer training. For my personal interest, I came up with the idea of "prime numbers where all 16 numbers are different". It consisted of four prime numbers. It may be interesting to consider a prime number 4 queen square where the total value of 16 squares is smaller than this.