# Sum of numbers in any row, column or diagonal is 50

In the following grid;

1. Sum of numbers in any row is equal to 50.
2. Sum of numbers in any column is equal to 50.
3. Sum of numbers in any diagonal is equal to 50.
4. Numbers in any two cells cannot be equal to each other.
5. Only the numbers from 5 to 20 are allowed. Find all numbers from A to L.

$$\begin {array}{c c c c} 20&6&7&17\\9&15&14&12\\13&11&10&16\\8&18&19&5 \end {array}$$

Looking at above matrix you can find the values of A to L.

Construction of a 4x4 magic square can be found in a book by Jerome S. Meyer, Fun With Mathematics.

Method (slighly modified for your input) goes as:

1. Count 20 to 5 and fill only the digonal numbers

$$\begin {array}{c c c c} 20&-&-&17\\-&15&14&-\\-&11&10&-\\8&-&-&5 \end {array}$$
Not visited numbers: 19, 18, 16, 13, 12, 9, 7 and 6

1. Now go in reverse direction counting non-visited numbers and fill in the empty cells to get the answer matrix.

2. This works because you are balancing the sum of pair of numbers available before with the pair of new numbers in opposite order. (Equal distribution)

A possible solution is

20  9 13  8
6 15 11 18
7 14 10 19
17 12 16  5

which can be constructed as the

modification of the classic 'Jupiter' magic square
https://en.wikipedia.org/wiki/Magic_square#Europe
just add 4 to every cell, and rotate it

     20     9     13      8
6     15     11     18
7     14     10     19
17    12     16      5

• you should explain a bit your logic. – Marius Apr 15 '16 at 13:03