# How Many Magic Hexagons that use repeated digits?

There exists only 1 normal magic hexagon that uses non repeating consecutive digits for 1 to 19.

If We allow digits to repeat we can create something like this hexagon that is made up using consecutive digits from 1 to 3.

All digits that are the same have been highlighted in the same colour.
If we multiply every digit in the grid by any number we will create a new magic hexagon but the pattern of coloured cells will remain the same.

Here is another pattern that has the most of any repeating single digit, being 1 appearing 10 times. This uses non consecutive digits

Again if we multiply all the digits by any number we get a new magic hexagon but not a new pattern.

Here are some more examples that all use different patterns that use consecutive digits

Magic sum 10.

Magic sum 15.
In this one we nearly have a magic hexagon that has no repeating digits within its magic lines, only the repeating 6s spoil it

And here are 2 more examples that use non consecutive digits both with a magic sum of 11.

And lastly 2 more examples that use larger numbers.

Magic sum 29
Magic sum 30.

All of the 8 examples have unique patterns.

Question 1
How many unique patterns are there that use repeating consecutive digits?

Question 2
How many unique patterns are there that use repeating non consecutive digits?

Question 3
Is it possible to construct a Magic hexagon that uses repeated digits within the grid but doesn't have any repeated digits within any row columns or diagonal line?.

Please provide a list of all results.

• Must there be a 1 in the grid? Otherwise the search space is too big. Commented Mar 17, 2023 at 13:48
• I dont think the search space would be too big without a 1 because there is only a finite number of ways of colouring the grid.
– Maff
Commented Mar 17, 2023 at 15:41
• But the finite number of solutions does not limit the search space. There is an infinity of ways to fill the grid (for a trial solution) with no upper bound, so for that reason I'm passing on Q2 and Q3, where there is no consecutive constraint, and because I found a vast number of solutions to Q1. Commented Mar 17, 2023 at 16:57

Question 1 How many unique patterns are there that use repeating consecutive digits?

Without setting a limit the search space is vast, so the spread of consecutive digits always starts at 1 here. Even so, there are too many unique solutions to show, so I have posted a summary, showing grids only where there are fewer than 60 solutions.

Summary
Range 1 to 1: results=0
Range 1 to 2: results=0
Range 1 to 3: results=1
Range 1 to 4: results=9
Range 1 to 5: results=43
Range 1 to 6: results=179
Range 1 to 7: results=508
Range 1 to 8: results=1147
Range 1 to 9: results=2092
Range 1 to 10: results=3098
Range 1 to 11: results=3622
Range 1 to 12: results=3589
Range 1 to 13: results=2681
Range 1 to 14: results=1585
Range 1 to 15: results=711
Range 1 to 16: results=254
Range 1 to 17: results=54
Range 1 to 18: results=5
Range 1 to 19: results=1

 Range 1 to 3: results=1
Magic sum 8
2   3   3
3   1   1   3
3   1   1   1   2
3   1   1   3
2   3   3
--------------------------
Range 1 to 4: results=9
Magic sum 9
2   4   3
3   1   1   4
4   1   1   1   2
3   2   1   3
2   3   4

Magic sum 9
2   4   3
4   1   1   3
3   1   1   1   3
3   1   2   3
3   3   3

Magic sum 9
1   4   4
4   1   1   3
4   1   1   1   2
3   1   2   3
2   3   4

Magic sum 10
2   4   4
4   1   1   4
4   2   1   1   2
3   1   2   4
3   3   4

Magic sum 10
2   4   4
4   2   1   3
4   1   1   1   3
3   1   2   4
3   4   3

Magic sum 10
3   4   3
3   2   1   4
4   1   1   1   3
3   2   1   4
3   4   3

Magic sum 10
3   4   3
4   1   1   4
3   1   2   1   3
4   1   1   4
3   4   3

Magic sum 11
3   4   4
4   2   1   4
4   1   1   2   3
4   2   1   4
3   4   4

Magic sum 11
3   4   4
4   1   2   4
4   2   1   1   3
4   1   2   4
3   4   4
--------------------------
Range 1 to 5: results=43
Magic sum 9
1   4   4
3   1   1   4
5   1   1   1   1
3   2   1   3
1   3   5

Magic sum 10
1   5   4
4   1   1   4
5   1   1   1   2
3   2   2   3
2   3   5

Magic sum 10
1   4   5
4   1   1   4
5   2   1   1   1
3   1   2   4
2   3   5

Magic sum 10
1   4   5
4   2   1   3
5   1   1   1   2
3   1   2   4
2   4   4

Magic sum 10
2   4   4
3   2   1   4
5   1   1   1   2
3   2   1   4
2   4   4

Magic sum 10
2   5   3
5   1   1   3
3   1   1   1   4
3   1   3   3
4   3   3

Magic sum 10
2   5   3
4   1   1   4
4   1   1   1   3
3   2   2   3
3   3   4

Magic sum 11
1   5   5
5   1   1   4
5   2   1   1   2
3   1   3   4
3   3   5

Magic sum 11
1   5   5
5   2   1   3
5   1   1   1   3
3   1   3   4
3   4   4

Magic sum 11
2   5   4
4   1   1   5
5   2   1   1   2
3   2   2   4
3   3   5

Magic sum 11
2   5   4
4   1   2   4
5   1   1   1   3
4   2   2   3
2   4   5

Magic sum 11
2   5   4
4   2   1   4
5   1   1   1   3
3   2   2   4
3   4   4

Magic sum 11
2   5   4
5   1   1   4
4   1   1   2   3
4   2   2   3
3   3   5

Magic sum 11
2   5   4
5   1   1   4
4   1   2   1   3
4   1   2   4
3   4   4

Magic sum 11
2   5   4
5   1   1   4
4   2   1   1   3
3   1   3   4
4   3   4

Magic sum 11
2   5   4
5   2   1   3
4   1   1   1   4
3   1   3   4
4   4   3

Magic sum 11
2   4   5
4   3   1   3
5   1   1   1   3
3   1   2   5
3   5   3

Magic sum 11
3   5   3
4   1   1   5
4   2   1   1   3
3   2   2   4
4   3   4

Magic sum 11
3   5   3
4   1   1   5
4   1   2   1   3
4   2   1   4
3   4   4

Magic sum 11
3   5   3
3   2   1   5
5   1   1   1   3
3   3   1   4
3   4   4

Magic sum 11
3   5   3
4   1   2   4
4   1   1   1   4
4   2   2   3
3   4   4

Magic sum 12
2   5   5
5   2   1   4
5   2   1   1   3
3   1   3   5
4   4   4

Magic sum 12
2   5   5
5   3   1   3
5   1   1   1   4
3   1   3   5
4   5   3

Magic sum 12
2   5   5
5   1   2   4
5   2   1   1   3
4   1   3   4
3   4   5

Magic sum 12
2   5   5
5   1   1   5
5   3   1   1   2
3   1   3   5
4   3   5

Magic sum 12
2   5   5
5   1   1   5
5   2   2   1   2
4   1   2   5
3   4   5

Magic sum 12
2   5   5
5   2   1   4
5   1   2   1   3
4   1   2   5
3   5   4

Magic sum 12
2   5   5
5   2   1   4
5   1   1   2   3
4   2   2   4
3   4   5

Magic sum 12
3   5   4
4   1   2   5
5   2   1   1   3
4   2   2   4
3   4   5

Magic sum 12
3   5   4
4   2   1   5
5   1   1   2   3
4   3   1   4
3   4   5

Magic sum 12
3   5   4
4   2   1   5
5   1   2   1   3
4   2   1   5
3   5   4

Magic sum 12
3   5   4
4   2   1   5
5   2   1   1   3
3   2   2   5
4   4   4

Magic sum 12
3   5   4
4   2   2   4
5   1   1   1   4
4   2   2   4
3   5   4

Magic sum 12
3   5   4
4   3   1   4
5   1   1   1   4
3   2   2   5
4   5   3

Magic sum 12
3   5   4
5   1   1   5
4   2   2   1   3
4   1   2   5
4   4   4

Magic sum 12
3   5   4
5   1   2   4
4   2   1   1   4
4   1   3   4
4   4   4

Magic sum 12
3   5   4
5   2   1   4
4   1   1   2   4
4   2   2   4
4   4   4

Magic sum 12
3   5   4
5   2   1   4
4   1   2   1   4
4   1   2   5
4   5   3

Magic sum 13
3   5   5
5   2   1   5
5   2   1   2   3
4   2   2   5
4   4   5

Magic sum 13
3   5   5
5   2   2   4
5   2   1   1   4
4   1   3   5
4   5   4

Magic sum 13
3   5   5
5   3   1   4
5   1   1   2   4
4   2   2   5
4   5   4

Magic sum 13
4   5   4
4   3   1   5
5   1   1   2   4
4   3   1   5
4   5   4

Magic sum 13
3   5   5
5   1   2   5
5   3   1   1   3
4   1   3   5
4   4   5
--------------------------
...
--------------------------
Range 1 to 17: results=54
Magic sum 32
3  13  16
12   9   1  10
17   2   4   3   6
8   4   5  15
7  14  11

Magic sum 32
2  16  14
13   3   4  12
17   5   3   1   6
8   4   9  11
7  10  15

Magic sum 33
5  17  11
16   3   1  13
12   7   4   1   9
6   2  11  14
15   8  10

Magic sum 33
3  17  13
16   4   1  12
14   4   2   5   8
8   6   9  10
11   7  15

Magic sum 33
5  17  11
15   4   8   6
13   1   2   1  16
11   3  12   7
9  14  10

Magic sum 33
5  16  12
11   4   3  15
17   7   2   1   6
6   6   8  13
10   9  14

Magic sum 34
4  17  13
16   1   3  14
14   5   6   2   7
11   3   8  12
9  10  15

Magic sum 34
4  17  13
16   5   1  12
14   3   2   6   9
9   7   8  10
11   8  15

Magic sum 34
3  15  16
14   5   4  11
17   6   3   1   7
8   2  10  14
9  12  13

Magic sum 34
7  15  12
10   9   1  14
17   4   3   2   8
6   7   5  16
11  13  10

Magic sum 34
7  17  10
16   2   1  15
11   6   5   3   9
9   4   8  13
14   8  12

Magic sum 34
7  17  10
11   5   3  15
16   2   6   1   9
10   7   4  13
8  14  12

Magic sum 34
6  15  13
11   8   3  12
17   1   5   2   9
10   6   4  14
7  16  11

Magic sum 34
6  16  12
15   4   1  14
13   3   2   8   8
11   9   5   9
10   7  17

Magic sum 34
3  15  16
14   4   5  11
17   6   3   1   7
9   2  10  13
8  12  14

Magic sum 34
3  17  14
15   5   6   8
16   1   3   2  12
11   4  10   9
7  14  13

Magic sum 34
4  16  14
13   7   3  11
17   1   2   5   9
10   8   6  10
7  12  15

Magic sum 34
6  17  11
16   1   7  10
12   2   3   4  13
14   5   9   6
8  11  15

Magic sum 34
5  15  14
12   9   1  12
17   4   3   2   8
6   5   7  16
11  13  10

Magic sum 34
5  13  16
12  10   1  11
17   2   3   5   7
9   6   4  15
8  14  12

Magic sum 34
7  13  14
12   8   3  11
15   4   5   1   9
9   2   6  17
10  16   8

Magic sum 35
5  16  14
13   6   7   9
17   3   2   1  12
10   4  10  11
8  15  12

Magic sum 35
5  16  14
13   7   3  12
17   2   6   1   9
10   4   6  15
8  16  11

Magic sum 35
4  17  14
16   7   1  11
15   2   3   5  10
9   6   8  12
11  11  13

Magic sum 35
5  16  14
13   3   7  12
17   6   2   1   9
10   4  10  11
8  12  15

Magic sum 35
5  16  14
13   3   6  13
17   7   2   1   8
9   4  10  12
9  11  15

Magic sum 35
5  14  16
13   4   6  12
17   8   1   2   7
9   3  10  13
9  11  15

Magic sum 35
7  17  11
16   2   8   9
12   3   1   4  15
13   5  11   6
10  11  14

Magic sum 35
5  17  13
16   1   3  15
14   8   2   4   7
9   5  10  11
12   6  17

Magic sum 35
4  15  16
14   9   1  11
17   3   2   5   8
8   6   7  14
10  12  13

Magic sum 35
6  17  12
15   1   3  16
14   7   5   2   7
10   4   8  13
11   9  15

Magic sum 35
4  16  15
14   8   2  11
17   1   3   5   9
10   7   6  12
8  13  14

Magic sum 35
6  16  13
12   9   1  13
17   2   4   3   9
8   7   5  15
10  14  11

Magic sum 35
6  16  13
14   5   1  15
15   2   4   7   7
12   9   3  11
8  10  17

Magic sum 35
8  17  10
16   2   5  12
11   1   7   3  13
15   4   6  10
9  14  12

Magic sum 35
7  17  11
15   4   1  15
13   8   2   3   9
6   5  10  14
16   7  12

Magic sum 35
4  17  14
16   7   1  11
15   3   2   5  10
8   6   9  12
12  10  13

Magic sum 35
8  17  10
14   3   2  16
13   5   7   1   9
10   4   6  15
12  12  11

Magic sum 35
4  16  15
14   7   6   8
17   1   2   3  12
11   5   9  10
7  15  13

Magic sum 36
7  14  15
12  10   1  13
17   2   5   4   8
10   6   3  17
9  16  11

Magic sum 36
6  17  13
16   8   5   7
14   1   2   3  16
10   4  11  11
12  15   9

Magic sum 36
6  17  13
16   7   5   8
14   1   4   2  15
11   3  10  12
11  16   9

Magic sum 36
5  15  16
14   6   7   9
17   4   3   1  11
11   2  10  13
8  16  12

Magic sum 36
5  17  14
15   1   7  13
16   6   3   2   9
12   4  10  10
8  11  17

Magic sum 36
7  17  12
13   9   3  11
16   4   2   1  13
6   5  10  15
14  14   8

Magic sum 36
7  17  12
15   9   1  11
14   4   2   3  13
6   5  10  15
16  12   8

Magic sum 36
7  17  12
16   6   3  11
13   4   5   1  13
9   2  10  15
14  14   8

Magic sum 36
6  17  13
16   1   7  12
14   4   5   2  11
14   3   9  10
8  13  15

Magic sum 36
7  15  14
12  11   3  10
17   4   1   2  12
6   5   9  16
13  15   8

Magic sum 36
7  15  14
13  11   2  10
16   1   4   3  12
9   5   6  16
11  17   8

Magic sum 37
6  17  14
16   8   1  12
15   5   4   2  11
7   3  10  17
15  13   9

Magic sum 37
5  17  15
15   2   6  14
17   7   4   1   8
11   3  10  13
9  12  16

Magic sum 37
8  17  12
15   4   2  16
14  10   1   3   9
6   5  11  15
17   7  13

Magic sum 37
6  15  16
14  12   1  10
17   3   2   4  11
7   5   8  17
13  15   9
--------------------------
Range 1 to 18: results=5
Magic sum 35
4  18  13
17   1   2  15
14   6   5   3   7
10   4   9  12
11   8  16

Magic sum 35
4  18  13
17   1   2  15
14   5   6   3   7
11   4   8  12
10   9  16

Magic sum 36
7  18  11
17   2   8   9
12   1   3   4  16
15   5  10   6
9  13  14

Magic sum 37
7  14  16
13  12   2  10
17   5   1   3  11
6   4   9  18
14  15   8

Magic sum 37
7  16  14
13  10   2  12
17   5   3   1  11
6   4   9  18
14  15   8
--------------------------
Range 1 to 19: results=1
Magic sum 38
3  19  16
17   7   2  12
18   1   5   4  10
11   6   8  13
9  14  15


• Wow!!!. I thought it was way more restricted than that... blows my mind
– Maff
Commented Mar 17, 2023 at 18:52
• Perhaps you can see why I wasn't keen to relax the constraints! Commented Mar 17, 2023 at 18:56
• If my calculations are correct that gives, 19,579 possible unique patterns if the largest entry in the grid is capped at 19 then that must also include all the non consecutive patterns too??
– Maff
Commented Mar 18, 2023 at 6:18

Question 3 Is it possible to construct a Magic hexagon that uses repeated digits within the grid but doesn't have any repeated digits within any row columns or diagonal line?

Assumptions to limit the solutions:
~ the digits must be consecutive
~ each hexagon must begin with 1
I found a number of solutions, few enough to post them all.

Summary
Range 1 to 1: results=0
Range 1 to 2: results=0
Range 1 to 3: results=0
Range 1 to 4: results=0
Range 1 to 5: results=0
Range 1 to 6: results=0
Range 1 to 7: results=0
Range 1 to 8: results=0
Range 1 to 9: results=0
Range 1 to 10: results=10
Range 1 to 11: results=3
Range 1 to 12: results=14
Range 1 to 13: results=15
Range 1 to 14: results=34
Range 1 to 15: results=26
Range 1 to 16: results=22
Range 1 to 17: results=18
Range 1 to 18: results=4
Range 1 to 19: results=1

 --------------------------
Range 1 to 10: results=10
Magic sum 21
3   8  10
8   4   3   6
10   3   2   1   5
6   1   5   9
5   9   7

Magic sum 22
3   9  10
9   1   4   8
10   5   2   1   4
7   1   6   8
5   7  10

Magic sum 23
4  10   9
10   2   3   8
9   5   1   2   6
6   2   7   8
8   6   9

Magic sum 23
5  10   8
10   4   3   6
8   3   1   2   9
6   2   7   8
9   8   6

Magic sum 23
6  10   7
8   3   2  10
9   4   1   3   6
6   5   4   8
8   6   9

Magic sum 23
5   8  10
8   6   2   7
10   2   1   4   6
7   4   3   9
6   9   8

Magic sum 23
6  10   7
8   2   3  10
9   5   1   2   6
6   4   5   8
8   6   9

Magic sum 24
6  10   8
10   1   4   9
8   4   3   2   7
9   2   5   8
7   8   9

Magic sum 24
6  10   8
10   4   1   9
8   1   3   5   7
9   5   2   8
7   8   9

Magic sum 24
5  10   9
10   2   4   8
9   4   3   1   7
8   1   6   9
7   9   8
--------------------------
Range 1 to 11: results=3
Magic sum 24
6  11   7
11   1   3   9
7   3   2   4   8
9   4   5   6
8   6  10

Magic sum 24
6  10   8
10   2   3   9
8   3   1   5   7
9   5   4   6
7   6  11

Magic sum 24
5   9  10
9   6   1   8
10   1   4   3   6
8   3   2  11
6  11   7
--------------------------
Range 1 to 12: results=14
Magic sum 22
3   9  10
7   5   1   9
12   1   2   4   3
7   6   1   8
3   8  11

Magic sum 25
6  11   8
7   3   4  11
12   4   2   1   6
7   5   4   9
6   9  10

Magic sum 25
6  12   7
8   2   3  12
11   3   4   1   6
8   5   3   9
6   9  10

Magic sum 26
6  12   8
9   5   1  11
11   1   4   3   7
8   6   2  10
7  10   9

Magic sum 26
4  12  10
12   3   2   9
10   2   6   1   7
9   1   5  11
7  11   8

Magic sum 26
4  10  12
10   3   5   8
12   5   1   2   6
8   2   7   9
6   9  11

Magic sum 26
5  12   9
10   4   1  11
11   1   3   5   6
9   7   2   8
6   8  12

Magic sum 26
5  10  11
9   3   6   8
12   4   1   2   7
9   3   6   8
5  10  11

Magic sum 26
6  12   8
11   2   1  12
9   5   4   2   6
7   3   5  11
10   7   9

Magic sum 27
4  12  11
11   2   4  10
12   5   3   1   6
8   2   7  10
7   9  11

Magic sum 27
4  12  11
11   1   6   9
12   4   3   1   7
10   2   7   8
5  10  12

Magic sum 27
4  12  11
12   5   1   9
11   4   2   3   7
6   3   7  11
10   8   9

Magic sum 27
5  12  10
12   4   2   9
10   5   1   3   8
6   3   8  10
11   7   9

Magic sum 27
6  12   9
10   4   2  11
11   1   3   5   7
10   7   2   8
6   9  12
--------------------------
Range 1 to 13: results=15
Magic sum 26
3  13  10
12   2   3   9
11   3   1   4   7
8   5   7   6
7   6  13

Magic sum 26
3  12  11
10   4   3   9
13   2   1   4   6
8   6   5   7
5   8  13

Magic sum 26
3  12  11
10   5   3   8
13   3   1   2   7
6   4   7   9
7   9  10

Magic sum 26
2  11  13
11   5   2   8
13   4   3   1   5
6   1   7  12
7  10   9

Magic sum 27
5  12  10
10   4   2  11
12   1   3   5   6
10   7   2   8
5   9  13

Magic sum 27
5  12  10
9   6   1  11
13   1   3   4   6
8   7   2  10
6  10  11

Magic sum 27
4  11  12
10   9   1   7
13   1   2   3   8
6   4   5  12
8  12   7

Magic sum 27
5  13   9
12   3   5   7
10   2   1   3  11
9   4   8   6
8   9  10

Magic sum 28
4  13  11
11   2   3  12
13   7   1   2   5
6   4   8  10
9   6  13

Magic sum 28
6  13   9
10   4   3  11
12   1   2   5   8
10   8   3   7
6   9  13

Magic sum 28
4  13  11
13   3   2  10
11   5   1   4   7
7   4   8   9
10   6  12

Magic sum 29
6  13  10
11   5   1  12
12   3   2   5   7
8   7   4  10
9   8  12

Magic sum 30
5  12  13
12   8   1   9
13   3   2   4   8
7   4   6  13
10  11   9

Magic sum 30
7  13  10
11   1   6  12
12   5   3   2   8
11   4   6   9
7  10  13

Magic sum 30
5  13  12
12   6   1  11
13   2   3   5   7
9   6   4  11
8  10  12
--------------------------
Range 1 to 14: results=34
Magic sum 24
1  11  12
10   4   1   9
13   1   2   5   3
8   6   3   7
3   7  14

Magic sum 26
4  12  10
9   2   4  11
13   4   1   3   5
8   6   5   7
5   7  14

Magic sum 26
1  14  11
12   5   1   8
13   1   3   2   7
6   4   7   9
7   9  10

Magic sum 27
2  14  11
13   5   2   7
12   2   1   3   9
6   4   9   8
9   8  10

Magic sum 28
3  13  12
11   6   1  10
14   1   2   5   6
8   7   4   9
6   9  13

Magic sum 28
6  14   8
13   2   4   9
9   5   1   2  11
7   3  10   8
12   7   9

Magic sum 28
6  13   9
10   2   5  11
12   3   1   4   8
10   7   5   6
6   8  14

Magic sum 28
5  14   9
11   1   3  13
12   7   2   1   6
6   4   8  10
10   6  12

Magic sum 28
5  13  10
11   3   2  12
12   1   4   5   6
11   7   2   8
5   9  14

Magic sum 29
6  14   9
9   5   2  13
14   1   4   3   7
9   8   2  10
6  11  12

Magic sum 29
7  14   8
13   5   1  10
9   2   3   4  11
8   5   6  10
12   9   8

Magic sum 29
6  14   9
13   3   5   8
10   1   4   2  12
11   3   7   8
8  12   9

Magic sum 29
6  14   9
14   3   4   8
9   5   2   1  12
7   1  11  10
13   9   7

Magic sum 30
5  14  11
14   4   2  10
11   3   6   1   9
9   1   7  13
10  12   8

Magic sum 30
5  14  11
14   6   1   9
11   3   4   2  10
7   2   8  13
12  11   7

Magic sum 30
6  14  10
11   2   5  12
13   5   3   1   8
9   4   7  10
8  10  12

Magic sum 30
5  12  13
12   8   3   7
13   4   2   1  10
6   1   9  14
11  13   6

Magic sum 30
5  14  11
13   2   6   9
12   3   4   1  10
11   2   8   9
7  12  11

Magic sum 30
5  14  11
12   2   6  10
13   4   1   3   9
10   5   8   7
7   9  14

Magic sum 30
5  14  11
12   1   4  13
13   8   2   1   6
7   3   9  11
10   7  13

Magic sum 30
7  14   9
12   3   2  13
11   4   6   1   8
9   3   5  13
10  11   9

Magic sum 30
5  14  11
12   6   3   9
13   2   1   4  10
8   6   7   9
9  10  11

Magic sum 30
7  14   9
14   2   1  13
9   4   6   3   8
10   3   5  12
11   9  10

Magic sum 31
6  14  11
12   5   6   8
13   1   3   2  12
11   4   7   9
7  14  10

Magic sum 31
6  14  11
13   5   6   7
12   2   1   3  13
10   4   9   8
9  12  10

Magic sum 31
4  13  14
13   7   3   8
14   5   2   1   9
6   1  10  14
11  12   8

Magic sum 31
4  14  13
14   6   1  10
13   3   2   5   8
8   5   7  11
10   9  12

Magic sum 31
5  14  12
14   4   3  10
12   7   1   2   9
6   2  11  12
13   8  10

Magic sum 31
8  14   9
13   3   7   8
10   1   2   4  14
13   5   7   6
8  12  11

Magic sum 31
7  14  10
13   2   7   9
11   3   1   4  12
12   5   8   6
8  10  13

Magic sum 32
7  14  11
14   4   1  13
11   2   5   6   8
12   6   3  11
9  10  13

Magic sum 32
7  12  13
11  10   2   9
14   3   1   4  10
7   5   6  14
11  13   8

Magic sum 32
5  14  13
13   2   9   8
14   4   1   2  11
12   3  10   7
6  12  14

Magic sum 32
7  14  11
13   5   2  12
12   7   1   3   9
6   4   9  13
14   8  10
--------------------------
Range 1 to 15: results=26
Magic sum 28
3  12  13
11   5   2  10
14   2   1   6   5
9   7   4   8
5   8  15

Magic sum 29
4  12  13
11   2   6  10
14   5   1   3   6
10   4   7   8
5   9  15

Magic sum 29
6  15   8
11   1   3  14
12   3   5   2   7
10   6   4   9
7   9  13

Magic sum 29
2  15  12
14   1   3  11
13   4   5   1   6
9   2   8  10
7   9  13

Magic sum 29
4  12  13
10   3   5  11
15   6   1   2   5
8   4   7  10
6   9  14

Magic sum 29
4  12  13
10   6   1  12
15   3   2   5   4
8   7   3  11
6   9  14

Magic sum 30
3  15  12
13   5   2  10
14   1   4   3   8
9   5   6  10
7  11  12

Magic sum 30
3  15  12
14   4   1  11
13   2   5   3   7
9   4   6  11
8  10  12

Magic sum 31
5  14  12
11   4   3  13
15   7   2   1   6
6   4   8  13
10   9  12

Magic sum 31
5  14  12
11   4   7   9
15   3   2   1  10
10   4   8   9
6  13  12

Magic sum 31
4  14  13
12   5   6   8
15   1   3   2  10
11   4   7   9
5  14  12

Magic sum 31
5  12  14
11   6   5   9
15   4   3   1   8
9   2   7  13
7  14  10

Magic sum 32
5  13  14
13   6   1  12
14   3   2   7   6
10   7   4  11
8   9  15

Magic sum 32
5  15  12
12   2   5  13
15   6   3   1   7
9   4   8  11
8  10  14

Magic sum 32
5  13  14
12   6   3  11
15   5   4   1   7
8   2   7  15
9  13  10

Magic sum 32
6  15  11
14   5   6   7
12   1   2   3  14
11   4   9   8
9  13  10

Magic sum 32
7  15  10
11   4   3  14
14   7   2   1   8
6   5   8  13
12   9  11

Magic sum 33
6  15  12
14   1   7  11
13   5   2   3  10
12   4   9   8
8  10  15

Magic sum 33
7  15  11
14   5   1  13
12   7   2   3   9
6   4   9  14
15   8  10

Magic sum 33
7  15  11
14   4   2  13
12   1   5   6   9
13   7   3  10
8  11  14

Magic sum 33
6  15  12
13   2   8  10
14   4   1   3  11
12   5   9   7
7  11  15

Magic sum 33
7  15  11
12   6   1  14
14   2   4   5   8
10   8   3  12
9  11  13

Magic sum 33
8  15  10
13   4   2  14
12   8   1   3   9
6   5   9  13
15   7  11

Magic sum 34
7  14  13
12  10   1  11
15   2   3   4  10
8   6   5  15
11  14   9

Magic sum 34
6  15  13
13   7   5   9
15   4   2   1  12
8   3  10  13
11  14   9

Magic sum 35
6  15  14
14   5   4  12
15   8   1   2   9
7   3  11  14
13  10  12
--------------------------
Range 1 to 16: results=22
Magic sum 32
5  13  14
12   2   7  11
15   6   1   3   7
11   4   8   9
6  10  16

Magic sum 32
5  13  14
11   3   6  12
16   7   1   2   6
9   4   8  11
7  10  15

Magic sum 32
6  16  10
14   1   2  15
12   4   8   1   7
11   3   5  13
9  11  12

Magic sum 33
7  16  10
12   4   2  15
14   7   3   1   8
6   5   8  14
13   9  11

Magic sum 33
4  14  15
13   1   8  11
16   6   3   1   7
12   2   9  10
5  12  16

Magic sum 33
6  16  11
12   2   3  16
15   7   4   1   6
8   5   7  13
10   9  14

Magic sum 33
6  15  12
11   3   4  15
16   8   2   1   6
7   5   8  13
10   9  14

Magic sum 33
7  16  10
15   2   7   9
11   1   3   4  14
14   5   8   6
8  12  13

Magic sum 33
7  14  12
10   9   1  13
16   4   2   3   8
6   7   5  15
11  12  10

Magic sum 34
6  16  12
15   5   1  13
13   7   2   3   9
6   4  10  14
15   8  11

Magic sum 34
6  16  12
13   5   2  14
15   7   3   1   8
6   4   9  15
13  10  11

Magic sum 34
6  13  15
12  11   3   8
16   2   1   4  11
8   5   7  14
10  15   9

Magic sum 34
5  16  13
15   2   8   9
14   3   1   4  12
13   5  10   6
7  11  16

Magic sum 34
6  16  12
13   5   2  14
15   1   4   6   8
12   9   3  10
7  11  16

Magic sum 34
6  16  12
13   7   5   9
15   3   2   1  13
8   4  10  12
11  14   9

Magic sum 34
7  16  11
13   5   2  14
14   1   4   6   9
12   9   3  10
8  11  15

Magic sum 34
7  16  11
14   4   1  15
13   2   5   6   8
12   8   3  11
9  10  15

Magic sum 34
7  16  11
15   3   2  14
12   8   1   4   9
7   5  10  12
15   6  13

Magic sum 34
7  13  14
12  11   3   8
15   1   2   4  12
9   5   6  14
10  16   8

Magic sum 35
6  16  13
14   2   7  12
15   5   4   1  10
12   3   9  11
8  13  14

Magic sum 35
8  16  11
14   2   4  15
13   5   7   1   9
12   3   6  14
10  13  12

Magic sum 35
8  16  11
14   5   1  15
13   2   7   4   9
12   6   3  14
10  13  12
--------------------------
Range 1 to 17: results=18
Magic sum 34
6  15  13
11   8   3  12
17   1   5   2   9
10   6   4  14
7  16  11

Magic sum 34
6  17  11
16   1   7  10
12   2   3   4  13
14   5   9   6
8  11  15

Magic sum 34
7  15  12
10   9   1  14
17   4   3   2   8
6   7   5  16
11  13  10

Magic sum 34
5  13  16
12  10   1  11
17   2   3   5   7
9   6   4  15
8  14  12

Magic sum 34
7  17  10
11   5   3  15
16   2   6   1   9
10   7   4  13
8  14  12

Magic sum 35
4  15  16
14   9   1  11
17   3   2   5   8
8   6   7  14
10  12  13

Magic sum 35
4  16  15
14   8   2  11
17   1   3   5   9
10   7   6  12
8  13  14

Magic sum 35
4  16  15
14   7   6   8
17   1   2   3  12
11   5   9  10
7  15  13

Magic sum 35
4  17  14
16   7   1  11
15   3   2   5  10
8   6   9  12
12  10  13

Magic sum 35
8  17  10
16   2   5  12
11   1   7   3  13
15   4   6  10
9  14  12

Magic sum 35
5  17  13
16   1   3  15
14   8   2   4   7
9   5  10  11
12   6  17

Magic sum 36
5  15  16
14   6   7   9
17   4   3   1  11
11   2  10  13
8  16  12

Magic sum 36
7  17  12
15   9   1  11
14   4   2   3  13
6   5  10  15
16  12   8

Magic sum 36
7  15  14
12  11   3  10
17   4   1   2  12
6   5   9  16
13  15   8

Magic sum 36
7  15  14
13  11   2  10
16   1   4   3  12
9   5   6  16
11  17   8

Magic sum 37
5  17  15
15   2   6  14
17   7   4   1   8
11   3  10  13
9  12  16

Magic sum 37
8  17  12
15   4   2  16
14  10   1   3   9
6   5  11  15
17   7  13

Magic sum 37
6  15  16
14  12   1  10
17   3   2   4  11
7   5   8  17
13  15   9
--------------------------
Range 1 to 18: results=4
Magic sum 35
4  18  13
17   1   2  15
14   6   5   3   7
10   4   9  12
11   8  16

Magic sum 35
4  18  13
17   1   2  15
14   5   6   3   7
11   4   8  12
10   9  16

Magic sum 36
7  18  11
17   2   8   9
12   1   3   4  16
15   5  10   6
9  13  14

Magic sum 37
7  14  16
13  12   2  10
17   5   1   3  11
6   4   9  18
14  15   8
--------------------------
Range 1 to 19: results=1
Magic sum 38
3  19  16
17   7   2  12
18   1   5   4  10
11   6   8  13
9  14  15


• I included the 19 solution in both answers, although it does not have any repeated digits. Commented Mar 17, 2023 at 20:51
• How many solutions only have a single 1 in the grid? Its going to be huge isn't it
– Maff
Commented Mar 18, 2023 at 6:47