The Magic Encyclopedia ™ DataBase

half pan bimagic panmagic squares order 7
{note: investigative article}
(by Aale de Winkel)

(NOTE: the squares below have half their bimagic sums correct when all (broken) diagonal sums are considered, the general qualification quasi(14) I replaced with half (14 being the half of 28 possible))
Combining the construction of panmagic squares of prime order with the idea of bimagic permutations the possibility arises to construct "pan bimagic panmagic squares of prime order", below the best results of this approach for order 7 is listed. Out of 56 possible sums (7 rows, 7 columns, 7 diagonals and 7 subdiagonals, in both the regular and squared sums) 84 squares where found with 42 correct sums. By construction the squares are panmagic, 14 bimagic sums correct and 14 bimagic sums incorrect.
These squares have 7 sums in rows/columns and 7 sums in (sub-)diagonals (distributed 4/3 amongst them). Which one is best is a matter of taste of how the sums are distributed, squares like (2 3 20) can have no panrelocated version where the diagonal and sub-diagonal have correct bimagic sum (note: need verify this).
Below the table of these squares a table is provided listing all order 7 bimagic permutations

half pan bimagic panmagic squares order 7
used order 7 LS(a) remarks:
LS(2)

0 1 2 3 4 5 6
2 3 4 5 6 0 1
4 5 6 0 1 2 3
6 0 1 2 3 4 5
1 2 3 4 5 6 0
3 4 5 6 0 1 2
5 6 0 1 2 3 4
LS(3)

0 1 2 3 4 5 6
3 4 5 6 0 1 2
6 0 1 2 3 4 5
2 3 4 5 6 0 1
5 6 0 1 2 3 4
1 2 3 4 5 6 0
4 5 6 0 1 2 3
The below lists squares 7*LS(2)+LS(3)=[perm]+1
the used bimagic permutation,
and the bimagic sums
which are correct (1) or incorrect (0) along the
rows, columns, diagonals and subdiagonals
square: 2 3 17

01 14 18 26 31 41 44
19 24 34 37 43 07 11
30 36 49 04 12 17 27
46 05 10 20 23 29 42
13 16 22 35 39 47 03
28 32 40 45 06 09 15
38 48 02 08 21 25 33

perm: 0 6 3 4 2 5 1
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 18

01 14 18 27 30 40 45
20 23 33 38 43 07 11
31 36 49 04 13 16 26
46 06 09 19 24 29 42
12 17 22 35 39 48 02
28 32 41 44 05 10 15
37 47 03 08 21 25 34

perm: 0 6 3 5 1 4 2
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 19

01 14 19 24 32 41 44
17 25 34 37 43 07 12
30 36 49 05 10 18 27
47 03 11 20 23 29 42
13 16 22 35 40 45 04
28 33 38 46 06 09 15
39 48 02 08 21 26 31

perm: 0 6 4 2 3 5 1
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 20

01 14 19 24 34 37 46
17 27 30 39 43 07 12
32 36 49 05 10 20 23
47 03 13 16 25 29 42
09 18 22 35 40 45 06
28 33 38 48 02 11 15
41 44 04 08 21 26 31

perm: 0 6 4 2 5 1 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 21

01 14 20 23 32 40 45
16 25 33 38 43 07 13
31 36 49 06 09 18 26
48 02 11 19 24 29 42
12 17 22 35 41 44 04
28 34 37 46 05 10 15
39 47 03 08 21 27 30

perm: 0 6 5 1 3 4 2
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 22

01 14 20 23 33 38 46
16 26 31 39 43 07 13
32 36 49 06 09 19 24
48 02 12 17 25 29 42
10 18 22 35 41 44 05
28 34 37 47 03 11 15
40 45 04 08 21 27 30

perm: 0 6 5 1 4 2 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 38

02 13 17 26 32 42 43
19 25 35 36 44 06 10
29 37 48 03 12 18 28
45 05 11 21 22 30 41
14 15 23 34 38 47 04
27 31 40 46 07 08 16
39 49 01 09 20 24 33

perm: 1 5 2 4 3 6 0
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 39

02 13 17 26 35 36 46
19 28 29 39 44 06 10
32 37 48 03 12 21 22
45 05 14 15 25 30 41
08 18 23 34 38 47 07
27 31 40 49 01 11 16
42 43 04 09 20 24 33

perm: 1 5 2 4 6 0 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 41

02 13 18 24 33 42 43
17 26 35 36 44 06 11
29 37 48 04 10 19 28
46 03 12 21 22 30 41
14 15 23 34 39 45 05
27 32 38 47 07 08 16
40 49 01 09 20 25 31

perm: 1 5 3 2 4 6 0
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 42

02 13 18 28 29 38 47
21 22 31 40 44 06 11
33 37 48 04 14 15 24
46 07 08 17 26 30 41
10 19 23 34 39 49 01
27 32 42 43 03 12 16
36 45 05 09 20 25 35

perm: 1 5 3 6 0 2 4
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 43

02 13 21 22 31 40 46
15 24 33 39 44 06 14
32 37 48 07 08 17 26
49 01 10 19 25 30 41
12 18 23 34 42 43 03
27 35 36 45 05 11 16
38 47 04 09 20 28 29

perm: 1 5 6 0 2 4 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 44

02 13 21 22 32 38 47
15 25 31 40 44 06 14
33 37 48 07 08 18 24
49 01 11 17 26 30 41
10 19 23 34 42 43 04
27 35 36 46 03 12 16
39 45 05 09 20 28 29

perm: 1 5 6 0 3 2 4
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 60

03 12 16 27 32 42 43
20 25 35 36 45 05 09
29 38 47 02 13 18 28
44 06 11 21 22 31 40
14 15 24 33 37 48 04
26 30 41 46 07 08 17
39 49 01 10 19 23 34

perm: 2 4 1 5 3 6 0
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 61

03 12 16 27 35 36 46
20 28 29 39 45 05 09
32 38 47 02 13 21 22
44 06 14 15 25 31 40
08 18 24 33 37 48 07
26 30 41 49 01 11 17
42 43 04 10 19 23 34

perm: 2 4 1 5 6 0 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 62

03 12 18 23 34 42 43
16 27 35 36 45 05 11
29 38 47 04 09 20 28
46 02 13 21 22 31 40
14 15 24 33 39 44 06
26 32 37 48 07 08 17
41 49 01 10 19 25 30

perm: 2 4 3 1 5 6 0
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 63

03 12 18 28 29 37 48
21 22 30 41 45 05 11
34 38 47 04 14 15 23
46 07 08 16 27 31 40
09 20 24 33 39 49 01
26 32 42 43 02 13 17
36 44 06 10 19 25 35

perm: 2 4 3 6 0 1 5
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 65

03 12 21 22 30 41 46
15 23 34 39 45 05 14
32 38 47 07 08 16 27
49 01 09 20 25 31 40
13 18 24 33 42 43 02
26 35 36 44 06 11 17
37 48 04 10 19 28 29

perm: 2 4 6 0 1 5 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 66

03 12 21 22 32 37 48
15 25 30 41 45 05 14
34 38 47 07 08 18 23
49 01 11 16 27 31 40
09 20 24 33 42 43 04
26 35 36 46 02 13 17
39 44 06 10 19 28 29

perm: 2 4 6 0 3 1 5
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 79

04 08 21 26 31 41 44
19 24 34 37 46 01 14
30 39 43 07 12 17 27
49 05 10 20 23 32 36
13 16 25 29 42 47 03
22 35 40 45 06 09 18
38 48 02 11 15 28 33

perm: 3 0 6 4 2 5 1
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 80

04 08 21 27 30 40 45
20 23 33 38 46 01 14
31 39 43 07 13 16 26
49 06 09 19 24 32 36
12 17 25 29 42 48 02
22 35 41 44 05 10 18
37 47 03 11 15 28 34

perm: 3 0 6 5 1 4 2
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 82

04 09 20 24 33 42 43
17 26 35 36 46 02 13
29 39 44 06 10 19 28
48 03 12 21 22 32 37
14 15 25 30 41 45 05
23 34 38 47 07 08 18
40 49 01 11 16 27 31

perm: 3 1 5 2 4 6 0
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 83

04 09 20 28 29 38 47
21 22 31 40 46 02 13
33 39 44 06 14 15 24
48 07 08 17 26 32 37
10 19 25 30 41 49 01
23 34 42 43 03 12 18
36 45 05 11 16 27 35

perm: 3 1 5 6 0 2 4
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 88

04 10 19 23 34 42 43
16 27 35 36 46 03 12
29 39 45 05 09 20 28
47 02 13 21 22 32 38
14 15 25 31 40 44 06
24 33 37 48 07 08 18
41 49 01 11 17 26 30

perm: 3 2 4 1 5 6 0
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 89

04 10 19 28 29 37 48
21 22 30 41 46 03 12
34 39 45 05 14 15 23
47 07 08 16 27 32 38
09 20 25 31 40 49 01
24 33 42 43 02 13 18
36 44 06 11 17 26 35

perm: 3 2 4 6 0 1 5
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 96

04 12 17 22 35 41 44
15 28 34 37 46 05 10
30 39 47 03 08 21 27
45 01 14 20 23 32 40
13 16 25 33 38 43 07
26 31 36 49 06 09 18
42 48 02 11 19 24 29

perm: 3 4 2 0 6 5 1
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 97

04 12 17 27 30 36 49
20 23 29 42 46 05 10
35 39 47 03 13 16 22
45 06 09 15 28 32 40
08 21 25 33 38 48 02
26 31 41 44 01 14 18
37 43 07 11 19 24 34

perm: 3 4 2 5 1 0 6
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 102

04 13 16 22 35 40 45
15 28 33 38 46 06 09
31 39 48 02 08 21 26
44 01 14 19 24 32 41
12 17 25 34 37 43 07
27 30 36 49 05 10 18
42 47 03 11 20 23 29

perm: 3 5 1 0 6 4 2
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 103

04 13 16 26 31 36 49
19 24 29 42 46 06 09
35 39 48 02 12 17 22
44 05 10 15 28 32 41
08 21 25 34 37 47 03
27 30 40 45 01 14 18
38 43 07 11 20 23 33

perm: 3 5 1 4 2 0 6
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 105

04 14 15 23 34 38 47
16 27 31 40 46 07 08
33 39 49 01 09 20 24
43 02 13 17 26 32 42
10 19 25 35 36 44 06
28 29 37 48 03 12 18
41 45 05 11 21 22 30

perm: 3 6 0 1 5 2 4
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 106

04 14 15 24 33 37 48
17 26 30 41 46 07 08
34 39 49 01 10 19 23
43 03 12 16 27 32 42
09 20 25 35 36 45 05
28 29 38 47 02 13 18
40 44 06 11 21 22 31

perm: 3 6 0 2 4 1 5
hor: 1 0 1 0 1 0 0
ver: 1 1 0 1 0 1 0
dia: 1 1 1 1 0 0 0
sub: 1 1 0 0 0 0 1
square: 2 3 119

05 10 15 28 32 41 44
21 25 34 37 47 03 08
30 40 45 01 14 18 27
43 07 11 20 23 33 38
13 16 26 31 36 49 04
24 29 42 46 06 09 19
39 48 02 12 17 22 35

perm: 4 2 0 6 3 5 1
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 120

05 10 15 28 34 37 46
21 27 30 39 47 03 08
32 40 45 01 14 20 23
43 07 13 16 25 33 38
09 18 26 31 36 49 06
24 29 42 48 02 11 19
41 44 04 12 17 22 35

perm: 4 2 0 6 5 1 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 122

05 10 18 22 35 41 44
15 28 34 37 47 03 11
30 40 45 04 08 21 27
46 01 14 20 23 33 38
13 16 26 31 39 43 07
24 32 36 49 06 09 19
42 48 02 12 17 25 29

perm: 4 2 3 0 6 5 1
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 123

05 10 18 27 30 36 49
20 23 29 42 47 03 11
35 40 45 04 13 16 22
46 06 09 15 28 33 38
08 21 26 31 39 48 02
24 32 41 44 01 14 19
37 43 07 12 17 25 34

perm: 4 2 3 5 1 0 6
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 124

05 10 20 23 29 42 46
16 22 35 39 47 03 13
32 40 45 06 09 15 28
48 02 08 21 25 33 38
14 18 26 31 41 44 01
24 34 37 43 07 11 19
36 49 04 12 17 27 30

perm: 4 2 5 1 0 6 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 125

05 10 20 23 32 36 49
16 25 29 42 47 03 13
35 40 45 06 09 18 22
48 02 11 15 28 33 38
08 21 26 31 41 44 04
24 34 37 46 01 14 19
39 43 07 12 17 27 30

perm: 4 2 5 1 3 0 6
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 141

06 09 15 28 32 40 45
21 25 33 38 48 02 08
31 41 44 01 14 18 26
43 07 11 19 24 34 37
12 17 27 30 36 49 04
23 29 42 46 05 10 20
39 47 03 13 16 22 35

perm: 5 1 0 6 3 4 2
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 142

06 09 15 28 33 38 46
21 26 31 39 48 02 08
32 41 44 01 14 19 24
43 07 12 17 25 34 37
10 18 27 30 36 49 05
23 29 42 47 03 11 20
40 45 04 13 16 22 35

perm: 5 1 0 6 4 2 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 143

06 09 18 22 35 40 45
15 28 33 38 48 02 11
31 41 44 04 08 21 26
46 01 14 19 24 34 37
12 17 27 30 39 43 07
23 32 36 49 05 10 20
42 47 03 13 16 25 29

perm: 5 1 3 0 6 4 2
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 144

06 09 18 26 31 36 49
19 24 29 42 48 02 11
35 41 44 04 12 17 22
46 05 10 15 28 34 37
08 21 27 30 39 47 03
23 32 40 45 01 14 20
38 43 07 13 16 25 33

perm: 5 1 3 4 2 0 6
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 146

06 09 19 24 29 42 46
17 22 35 39 48 02 12
32 41 44 05 10 15 28
47 03 08 21 25 34 37
14 18 27 30 40 45 01
23 33 38 43 07 11 20
36 49 04 13 16 26 31

perm: 5 1 4 2 0 6 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 147

06 09 19 24 32 36 49
17 25 29 42 48 02 12
35 41 44 05 10 18 22
47 03 11 15 28 34 37
08 21 27 30 40 45 04
23 33 38 46 01 14 20
39 43 07 13 16 26 31

perm: 5 1 4 2 3 0 6
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 163

07 08 16 27 31 40 46
20 24 33 39 49 01 09
32 42 43 02 13 17 26
44 06 10 19 25 35 36
12 18 28 29 37 48 03
22 30 41 45 05 11 21
38 47 04 14 15 23 34

perm: 6 0 1 5 2 4 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 164

07 08 16 27 32 38 47
20 25 31 40 49 01 09
33 42 43 02 13 18 24
44 06 11 17 26 35 36
10 19 28 29 37 48 04
22 30 41 46 03 12 21
39 45 05 14 15 23 34

perm: 6 0 1 5 3 2 4
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 165

07 08 17 26 30 41 46
19 23 34 39 49 01 10
32 42 43 03 12 16 27
45 05 09 20 25 35 36
13 18 28 29 38 47 02
22 31 40 44 06 11 21
37 48 04 14 15 24 33

perm: 6 0 2 4 1 5 3
hor: 0 0 1 0 1 0 1
ver: 1 0 1 0 1 0 1
dia: 0 0 0 1 1 1 1
sub: 1 1 1 0 0 0 0
square: 2 3 166

07 08 17 26 32 37 48
19 25 30 41 49 01 10
34 42 43 03 12 18 23
45 05 11 16 27 35 36
09 20 28 29 38 47 04
22 31 40 46 02 13 21
39 44 06 14 15 24 33

perm: 6 0 2 4 3 1 5
hor: 0 1 0 1 0 0 1
ver: 1 0 1 0 1 1 0
dia: 0 0 1 1 1 1 0
sub: 0 0 1 1 1 0 0
square: 2 3 167

07 08 18 23 34 38 47
16 27 31 40 49 01 11
33 42 43 04 09 20 24
46 02 13 17 26 35 36
10 19 28 29 39 44 06
22 32 37 48 03 12 21
41 45 05 14 15 25 30

perm: 6 0 3 1 5 2 4
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
square: 2 3 168

07 08 18 24 33 37 48
17 26 30 41 49 01 11
34 42 43 04 10 19 23
46 03 12 16 27 35 36
09 20 28 29 39 45 05
22 32 38 47 02 13 21
40 44 06 14 15 25 31

perm: 6 0 3 2 4 1 5
hor: 1 0 0 1 0 1 0
ver: 1 0 1 1 0 1 0
dia: 0 1 1 1 1 0 0
sub: 0 0 0 0 1 1 1
LS(3)

0 1 2 3 4 5 6
3 4 5 6 0 1 2
6 0 1 2 3 4 5
2 3 4 5 6 0 1
5 6 0 1 2 3 4
1 2 3 4 5 6 0
4 5 6 0 1 2 3
LS(2)

0 1 2 3 4 5 6
2 3 4 5 6 0 1
4 5 6 0 1 2 3
6 0 1 2 3 4 5
1 2 3 4 5 6 0
3 4 5 6 0 1 2
5 6 0 1 2 3 4
The below lists squares 7*LS(3)+LS(2)=[perm]+1
the used bimagic permutation,
and the bimagic sums
which are correct (1) or incorrect (0) along the
rows, columns, diagonals and subdiagonals
square: 3 2 4

01 12 20 25 35 38 44
27 32 42 45 02 08 19
49 03 09 15 26 34 39
16 22 33 41 46 07 10
40 48 04 14 17 23 29
11 21 24 30 36 47 06
31 37 43 05 13 18 28

perm: 0 4 5 3 6 2 1
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 6

01 12 20 28 31 37 46
27 35 38 44 04 08 19
45 02 11 15 26 34 42
18 22 33 41 49 03 09
40 48 07 10 16 25 29
14 17 23 32 36 47 06
30 39 43 05 13 21 24

perm: 0 4 5 6 2 1 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 11

01 13 19 25 35 37 45
26 32 42 44 03 08 20
49 02 10 15 27 33 39
17 22 34 40 46 07 09
41 47 04 14 16 24 29
11 21 23 31 36 48 05
30 38 43 06 12 18 28

perm: 0 5 4 3 6 1 2
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 12

01 13 19 28 30 38 46
26 35 37 45 04 08 20
44 03 11 15 27 33 42
18 22 34 40 49 02 10
41 47 07 09 17 25 29
14 16 24 32 36 48 05
31 39 43 06 12 21 23

perm: 0 5 4 6 1 2 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 27

02 10 21 25 34 40 43
28 32 41 47 01 09 17
48 05 08 16 24 35 39
15 23 31 42 46 06 12
38 49 04 13 19 22 30
11 20 26 29 37 45 07
33 36 44 03 14 18 27

perm: 1 2 6 3 5 4 0
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 29

02 10 21 27 33 36 46
28 34 40 43 04 09 17
47 01 11 16 24 35 41
18 23 31 42 48 05 08
38 49 06 12 15 25 30
13 19 22 32 37 45 07
29 39 44 03 14 20 26

perm: 1 2 6 5 4 0 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 45

02 14 17 25 34 36 47
24 32 41 43 05 09 21
48 01 12 16 28 31 39
19 23 35 38 46 06 08
42 45 04 13 15 26 30
11 20 22 33 37 49 03
29 40 44 07 10 18 27

perm: 1 6 2 3 5 0 4
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 46

02 14 17 27 29 40 46
24 34 36 47 04 09 21
43 05 11 16 28 31 41
18 23 35 38 48 01 12
42 45 06 08 19 25 30
13 15 26 32 37 49 03
33 39 44 07 10 20 22

perm: 1 6 2 5 0 4 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 53

03 09 21 25 33 41 43
28 32 40 48 01 10 16
47 06 08 17 23 35 39
15 24 30 42 46 05 13
37 49 04 12 20 22 31
11 19 27 29 38 44 07
34 36 45 02 14 18 26

perm: 2 1 6 3 4 5 0
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 54

03 09 21 26 34 36 46
28 33 41 43 04 10 16
48 01 11 17 23 35 40
18 24 30 42 47 06 08
37 49 05 13 15 25 31
12 20 22 32 38 44 07
29 39 45 02 14 19 27

perm: 2 1 6 4 5 0 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 72

03 14 16 25 33 36 48
23 32 40 43 06 10 21
47 01 13 17 28 30 39
20 24 35 37 46 05 08
42 44 04 12 15 27 31
11 19 22 34 38 49 02
29 41 45 07 09 18 26

perm: 2 6 1 3 4 0 5
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 73

03 14 16 26 29 41 46
23 33 36 48 04 10 21
43 06 11 17 28 30 40
18 24 35 37 47 01 13
42 44 05 08 20 25 31
12 15 27 32 38 49 02
34 39 45 07 09 19 22

perm: 2 6 1 4 0 5 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 76

04 08 19 27 35 38 44
26 34 42 45 02 11 15
49 03 09 18 22 33 41
16 25 29 40 48 07 10
36 47 06 14 17 23 32
13 21 24 30 39 43 05
31 37 46 01 12 20 28

perm: 3 0 4 5 6 2 1
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 78

04 08 20 26 35 37 45
27 33 42 44 03 11 15
49 02 10 18 22 34 40
17 25 29 41 47 07 09
36 48 05 14 16 24 32
12 21 23 31 39 43 06
30 38 46 01 13 19 28

perm: 3 0 5 4 6 1 2
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 81

04 09 17 28 34 40 43
24 35 41 47 01 11 16
48 05 08 18 23 31 42
15 25 30 38 49 06 12
37 45 07 13 19 22 32
14 20 26 29 39 44 03
33 36 46 02 10 21 27

perm: 3 1 2 6 5 4 0
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 84

04 09 21 24 34 36 47
28 31 41 43 05 11 16
48 01 12 18 23 35 38
19 25 30 42 45 06 08
37 49 03 13 15 26 32
10 20 22 33 39 44 07
29 40 46 02 14 17 27

perm: 3 1 6 2 5 0 4
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 87

04 10 16 28 33 41 43
23 35 40 48 01 11 17
47 06 08 18 24 30 42
15 25 31 37 49 05 13
38 44 07 12 20 22 32
14 19 27 29 39 45 02
34 36 46 03 09 21 26

perm: 3 2 1 6 4 5 0
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 92

04 10 21 23 33 36 48
28 30 40 43 06 11 17
47 01 13 18 24 35 37
20 25 31 42 44 05 08
38 49 02 12 15 26 31
08 18 21 33 38 44 06
29 40 46 03 14 16 26

perm: 3 2 6 1 4 0 5
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 1 0 1 0 0
sub: 1 1 0 1 0 1 0
square: 3 2 93

04 12 15 27 31 42 44
22 34 38 49 02 11 19
45 07 09 18 26 29 41
16 25 33 36 48 03 14
40 43 06 10 21 23 32
13 17 28 30 39 47 01
35 37 46 05 08 20 24

perm: 3 4 0 5 2 6 1
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 1 0 1 0 0
sub: 1 1 0 1 0 1 0
square: 3 2 98

04 12 20 22 31 37 49
27 29 38 44 07 11 19
45 02 14 18 26 34 36
21 25 33 41 43 03 09
40 48 01 10 16 28 32
08 17 23 35 39 47 06
30 42 46 05 13 15 24

perm: 3 4 5 0 2 1 6
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 101

04 13 15 26 30 42 45
22 33 37 49 03 11 20
44 07 10 18 27 29 40
17 25 34 36 47 02 14
41 43 05 09 21 24 32
12 16 28 31 39 48 01
35 38 46 06 08 19 23

perm: 3 5 0 4 1 6 2
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 104

04 13 19 22 30 38 49
26 29 37 45 07 11 20
44 03 14 18 27 33 36
21 25 34 40 43 02 10
41 47 01 09 17 28 32
08 16 24 35 39 48 05
31 42 46 06 12 15 23

perm: 3 5 4 0 1 2 6
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 107

04 14 16 24 29 41 47
23 31 36 48 05 11 21
43 06 12 18 28 30 38
19 25 35 37 45 01 13
42 44 03 08 20 26 32
10 15 27 33 39 49 02
34 40 46 07 09 17 22

perm: 3 6 1 2 0 5 4
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 109

04 14 17 23 29 40 48
24 30 36 47 06 11 21
43 05 13 18 28 31 37
20 25 35 38 44 01 12
42 45 02 08 19 27 32
09 15 26 34 39 49 03
33 41 46 07 10 16 22

perm: 3 6 2 1 0 4 5
hor: 1 0 1 1 0 0 1
ver: 1 0 0 1 0 0 1
dia: 1 0 0 1 0 1 0
sub: 0 1 1 0 1 0 1
square: 3 2 112

05 08 20 24 35 37 46
27 31 42 44 04 12 15
49 02 11 19 22 34 38
18 26 29 41 45 07 09
36 48 03 14 16 25 33
10 21 23 32 40 43 06
30 39 47 01 13 17 28

perm: 4 0 5 2 6 1 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 113

05 08 20 25 31 42 44
27 32 38 49 02 12 15
45 07 09 19 22 34 39
16 26 29 41 46 03 14
36 48 04 10 21 23 33
11 17 28 30 40 43 06
35 37 47 01 13 18 24

perm: 4 0 5 3 2 6 1
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 131

05 13 15 24 30 42 46
22 31 37 49 04 12 20
44 07 11 19 27 29 38
18 26 34 36 45 02 14
41 43 03 09 21 25 33
10 16 28 32 40 48 01
35 39 47 06 08 17 23

perm: 4 5 0 2 1 6 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 132

05 13 15 25 31 37 49
22 32 38 44 07 12 20
45 02 14 19 27 29 39
21 26 34 36 46 03 09
41 43 03 09 21 25 33
11 17 23 34 40 48 01
30 42 47 06 08 18 24

perm: 4 5 0 3 2 1 6
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 0 1 0 1 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 139

06 08 19 23 35 38 46
26 30 42 45 04 13 15
49 03 11 20 22 33 37
18 27 29 40 44 07 10
36 47 02 14 17 25 34
09 21 24 32 41 43 05
31 39 48 01 12 16 28

perm: 5 0 4 1 6 2 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 140

06 08 19 25 30 42 45
26 32 37 49 03 13 15
44 07 10 20 22 33 39
17 27 29 40 46 02 14
36 47 04 09 21 24 34
11 16 28 31 41 43 05
35 38 48 01 12 18 23

perm: 5 0 4 3 1 6 2
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 156

06 12 15 23 31 42 46
22 30 38 49 04 13 19
45 07 11 20 26 29 37
18 27 33 36 44 03 14
40 43 02 10 21 25 34
09 17 28 32 41 47 01
35 39 48 05 08 16 24

perm: 5 4 0 1 2 6 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 158

06 12 15 25 30 38 49
22 32 37 45 07 13 19
44 03 14 20 26 29 39
21 27 33 36 46 02 10
40 43 04 09 17 28 34
11 16 24 35 41 47 01
31 42 48 05 08 18 23

perm: 5 4 0 3 1 2 6
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 173

07 09 17 22 34 40 46
24 29 41 47 04 14 16
48 05 11 21 23 31 36
18 28 30 38 43 06 12
37 45 01 13 19 25 35
08 20 26 32 42 44 03
33 39 49 02 10 15 27

perm: 6 1 2 0 5 4 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 174

07 09 17 25 29 41 47
24 32 36 48 05 14 16
43 06 12 21 23 31 39
19 28 30 38 46 01 13
37 45 04 08 20 26 35
11 15 27 33 42 44 03
34 40 49 02 10 18 22

perm: 6 1 2 3 0 5 4
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0
square: 3 2 179

07 10 16 22 33 41 46
23 29 40 48 04 14 17
47 06 11 21 24 30 36
18 28 31 37 43 05 13
38 44 01 12 20 25 35
08 19 27 32 42 45 02
34 39 49 03 09 15 26

perm: 6 2 1 0 4 5 3
hor: 1 0 0 1 1 0 1
ver: 1 1 0 0 1 0 0
dia: 0 1 0 1 0 0 1
sub: 1 0 1 0 1 0 1
square: 3 2 181

07 10 16 25 29 40 48
23 32 36 47 06 14 17
43 05 13 21 24 30 39
20 28 31 37 46 01 12
38 44 04 08 19 27 35
11 15 26 34 42 45 02
33 41 49 03 09 18 22

perm: 6 2 1 3 0 4 5
hor: 0 1 1 0 1 1 0
ver: 1 0 0 1 1 0 0
dia: 0 1 0 1 0 1 0
sub: 1 1 0 1 0 1 0


order 7 bimagic permutations
Full listing of all bimagic permutations for order 7
i=06 (7 * i + perm[i]) = 168
i=06 (7 * i + perm[i])2 = 5432
001: 0 3 5 6 4 2 1
002: 0 3 6 4 5 2 1
003: 0 3 6 5 4 1 2
004: 0 4 5 3 6 2 1
005: 0 4 5 6 1 3 2
006: 0 4 5 6 2 1 3
007: 0 4 6 2 5 3 1
008: 0 4 6 5 1 2 3
009: 0 5 3 4 6 2 1
010: 0 5 3 6 2 4 1
011: 0 5 4 3 6 1 2
012: 0 5 4 6 1 2 3
013: 0 5 6 1 4 3 2
014: 0 5 6 3 2 1 4
015: 0 6 2 4 5 3 1
016: 0 6 2 5 3 4 1
017: 0 6 3 4 2 5 1
018: 0 6 3 5 1 4 2
019: 0 6 4 2 3 5 1
020: 0 6 4 2 5 1 3
021: 0 6 5 1 3 4 2
022: 0 6 5 1 4 2 3
023: 0 6 5 2 3 1 4
024: 0 6 5 3 1 2 4
025: 1 2 4 6 5 3 0
026: 1 2 5 4 6 3 0
027: 1 2 6 3 5 4 0
028: 1 2 6 4 3 5 0
029: 1 2 6 5 4 0 3
030: 1 3 5 2 6 4 0
031: 1 3 5 4 2 6 0
032: 1 3 5 6 0 4 2
033: 1 3 5 6 2 0 4
034: 1 4 2 6 3 5 0
035: 1 4 3 5 2 6 0
036: 1 4 6 0 5 3 2
037: 1 4 6 3 2 0 5
038: 1 5 2 4 3 6 0
039: 1 5 2 4 6 0 3
040: 1 5 2 6 3 0 4
041: 1 5 3 2 4 6 0
042: 1 5 3 6 0 2 4
043: 1 5 6 0 2 4 3
044: 1 5 6 0 3 2 4
045: 1 6 2 3 5 0 4
046: 1 6 2 5 0 4 3
047: 1 6 4 0 3 5 2
048: 1 6 4 2 0 5 3
049: 1 6 4 3 0 2 5
050: 1 6 5 0 2 3 4
051: 2 1 4 5 6 3 0
052: 2 1 5 6 4 0 3
053: 2 1 6 3 4 5 0
054: 2 1 6 4 5 0 3
055: 2 3 1 6 5 4 0
056: 2 3 4 1 6 5 0
057: 2 3 4 6 1 0 5
058: 2 3 5 0 6 4 1
059: 2 4 0 6 5 3 1
060: 2 4 1 5 3 6 0
061: 2 4 1 5 6 0 3
062: 2 4 3 1 5 6 0
063: 2 4 3 6 0 1 5
064: 2 4 5 3 1 0 6
065: 2 4 6 0 1 5 3
066: 2 4 6 0 3 1 5
067: 2 5 1 6 0 4 3
068: 2 5 3 0 4 6 1
069: 2 5 3 4 1 0 6
070: 2 5 4 3 0 1 6
071: 2 6 0 5 1 4 3
072: 2 6 1 3 4 0 5
073: 2 6 1 4 0 5 3
074: 2 6 3 0 4 1 5
075: 2 6 4 0 1 3 5
076: 3 0 4 5 6 2 1
077: 3 0 4 6 5 1 2
078: 3 0 5 4 6 1 2
079: 3 0 6 4 2 5 1
080: 3 0 6 5 1 4 2
081: 3 1 2 6 5 4 0
082: 3 1 5 2 4 6 0
083: 3 1 5 6 0 2 4
084: 3 1 6 2 5 0 4
085: 3 1 6 4 2 0 5
086: 3 2 1 5 6 4 0
087: 3 2 1 6 4 5 0
088: 3 2 4 1 5 6 0
089: 3 2 4 6 0 1 5
090: 3 2 5 1 6 0 4
091: 3 2 6 0 5 1 4
092: 3 2 6 1 4 0 5
093: 3 4 0 5 2 6 1
094: 3 4 0 6 1 5 2
095: 3 4 1 5 0 6 2
096: 3 4 2 0 6 5 1
097: 3 4 2 5 1 0 6
098: 3 4 5 0 2 1 6
099: 3 4 5 1 0 2 6
100: 3 5 0 2 4 6 1
101: 3 5 0 4 1 6 2
102: 3 5 1 0 6 4 2
103: 3 5 1 4 2 0 6
104: 3 5 4 0 1 2 6
105: 3 6 0 1 5 2 4
106: 3 6 0 2 4 1 5
107: 3 6 1 2 0 5 4
108: 3 6 2 0 1 5 4
109: 3 6 2 1 0 4 5
110: 4 0 2 6 5 3 1
111: 4 0 3 6 2 5 1
112: 4 0 5 2 6 1 3
113: 4 0 5 3 2 6 1
114: 4 0 6 1 5 2 3
115: 4 1 2 3 6 5 0
116: 4 1 3 2 5 6 0
117: 4 1 3 6 2 0 5
118: 4 1 5 0 6 2 3
119: 4 2 0 6 3 5 1
120: 4 2 0 6 5 1 3
121: 4 2 1 3 5 6 0
122: 4 2 3 0 6 5 1
123: 4 2 3 5 1 0 6
124: 4 2 5 1 0 6 3
125: 4 2 5 1 3 0 6
126: 4 2 6 0 1 3 5
127: 4 3 1 6 0 2 5
128: 4 3 2 0 5 6 1
129: 4 3 2 5 0 1 6
130: 4 3 5 0 1 2 6
131: 4 5 0 2 1 6 3
132: 4 5 0 3 2 1 6
133: 4 5 1 0 2 6 3
134: 4 5 2 1 0 3 6
135: 5 0 1 6 4 3 2
136: 5 0 2 3 6 4 1
137: 5 0 2 4 6 1 3
138: 5 0 2 6 3 1 4
139: 5 0 4 1 6 2 3
140: 5 0 4 3 1 6 2
141: 5 1 0 6 3 4 2
142: 5 1 0 6 4 2 3
143: 5 1 3 0 6 4 2
144: 5 1 3 4 2 0 6
145: 5 1 4 0 3 6 2
146: 5 1 4 2 0 6 3
147: 5 1 4 2 3 0 6
148: 5 2 0 3 4 6 1
149: 5 2 0 6 1 3 4
150: 5 2 3 1 4 0 6
151: 5 2 4 0 3 1 6
152: 5 3 1 0 4 6 2
153: 5 3 1 0 6 2 4
154: 5 3 1 2 4 0 6
155: 5 3 1 4 0 2 6
156: 5 4 0 1 2 6 3
157: 5 4 0 2 3 1 6
158: 5 4 0 3 1 2 6
159: 5 4 1 2 0 3 6
160; 5 4 2 0 1 3 6
161: 6 0 1 3 5 4 2
162: 6 0 1 4 3 5 2
163: 6 0 1 5 2 4 3
164: 6 0 1 5 3 2 4
165: 6 0 2 4 1 5 3
166: 6 0 2 4 3 1 5
167: 6 0 3 1 5 2 4
168: 6 0 3 2 4 1 5
169: 6 0 4 1 3 2 5
170: 6 0 4 2 1 3 5
171: 6 1 0 3 4 5 2
172: 6 1 0 5 2 3 4
173: 6 1 2 0 5 4 3
174: 6 1 2 3 0 5 4
175: 6 1 3 0 4 2 5
176: 6 1 3 2 0 4 5
177: 6 2 0 1 5 4 3
178: 6 2 0 4 1 3 5
179: 6 2 1 0 4 5 3
180: 6 2 1 0 5 3 4
181: 6 2 1 3 0 4 5
182: 6 3 0 1 2 5 4
183: 6 3 0 2 1 4 5
184: 6 3 1 0 2 4 5