The magic square contains magic patterns consisting of repeated waves.
These can be pan-zigzag, (i.e., including all in the direction of the bend),
up, down, left, and right.
On this site, *n*-way means **pan**-*n*-way.
By default, zigzag means pan-4-way; otherwise, it is qualified as 3-way, 2-way, or 1-way.

Zigzag squares are further classified as zigzag_{k}, for
**k** = 2,3,4,...,<=n. The **k** refers to the number of cells
from trough to crest of a wave.
Zigzag_{2} can be only 4-way or inline 2-way, (up, down or left, right).

Zigzag_{2}Squares
makes zigzag_{2} squares for orders greater than 6. It uses the double border method:

- start with a zigzag
_{2}center bones of order 7, 8, or 9 - repeatedly add double borders of zigzag
_{2}bones numbers

For 2-way left and right, the sum of numbers in alternating cells is the same in each
column. Let the average of the magic square numbers, (n^{2}+1)/2, be S1.
Then, for odd order, the sum of the alternating cell numbers starting in the top
row can be S1(n+1)/2; the sum of the alternating cell numbers starting in
the second row is then S1(n-1)/2.
For doubly even orders, the corresponding sums of alternating cell numbers can be both
S1(n)/2. There are no zigzag_{2} squares of singly even order.

For 2-way up and down, these sums hold for the rows. For 4-way zigzag_{2},
the sums hold for rows and columns:

There are 53568 order 5 zigzag_{2} 2-way magic squares.

For odd orders greater than 5, there are zigzag_{2} 2-way and
4-way magic squares.

There are no zigzag magic squares of singly even order. Planck's proof, that there are no pandiagonal squares of singly even order, can be adapted for these squares. Substitute alternate zigzag paths for alternate diagonals in the proof.

There are 96 order 4 zigzag_{2} 2-way magic squares.
These are **TYPE V** in the classification by Dudeney. See
references.

For doubly even orders greater than 4, there are zigzag_{2} 2-way and
4-way magic squares.

Here are some zigzag_{3}
16x16 and
32x32
squares. They are also zigzag_{2}.

The 16x16 include associative, pandiagonal complete, bent diagonal 2-way, self-complement, and zigzag5-2way.

The 32x32 include associative, pandiagonal, bent pandiagonal, and trimagic.

The magic constant for order 16 is 16x(16^{2}+1)/2 = 2056.

For the 16x16 squares, the sums of
numbers in every fourth cell is the same in each row and column: 2056/4 = 514.
So, the zigzag_{3} and zigzag_{2} paths are
all composed of 4 sums of 514.

One zigzag_{3} right path is shown. Note that it includes 4 cells of each color.

One zigzag_{2} down path is shown. It too includes 4 cells of each color.

The magic constant for order 32 is 32x(32^{2}+1)/2 = 16400.
For the 32x32 squares, the sums of
numbers in every fourth cell is the same in each row and column: 16400/4 = 4100.
So, the zigzag_{3} and zigzag_{2} paths are
all composed of 4 sums of 4100.

Here are some zigzag_{4}
24x24 squares.
They are also zigzag_{2}.

The magic constant for order 24 is 24x(24^{2}+1)/2 = 6924.

The sums of numbers in every sixth cell is the same in each row and column: 6924/6 = 1154.

So, the zigzag_{4} and zigzag_{2} paths are all composed of 6 sums of 1154.

For example, the first zigzag_{4} down path sums are:

- row 1:
**1154 1154 1154 1154 1154 1154** - row 2:
**1154 1154 1154 1154 1154 1154** - row 3:
**1154 1154 1154 1154 1154 1154** - row 4:
**1154 1154 1154 1154 1154 1154** - ...

And, the first zigzag_{2} down path sums are:

- row 1:
**1154 1154 1154 1154 1154 1154** - row 2:
**1154 1154 1154 1154 1154 1154** - ...

Here are some zigzag_{5}
32x32 squares.
The first is a pandiagonal, bent diagonal square from
Dwane Campbell's site.
The others are all also zigzag2 and zigzag3 and include associative, bent diagonal 2-way,
bimagic and bipandiagonal, pandiagonal, pandiagonal complete, and self complement.

The magic constant for order 32 is 32x(32^{2}+1)/2 = 16400.

For some of the zigzag_{2,3,5} squares, the sums of
numbers in every eighth cell is the same in each row and column: 16400/8 = 2050.
So, the zigzag_{5}, zigzag_{3}, and zigzag_{2} paths are
all composed of 8 sums of 2050.

For other zigzag_{2,3,5} squares, the sums are not 2050,
but, pairs of the sums, (1538 2562), total 4100. These pairs are distributed such that there are
4 of them in every zigzag_{5}, zigzag_{3}, and zigzag_{2} path.

For one of these squares, the first zigzag_{5} down path sums are:

- row 1:
**1538 1538 1538 1538 2562 2562 2562 2562** - row 2:
**1538 2562 2562 1538 2562 1538 1538 2562** - row 3:
**1538 2562 2562 1538 2562 1538 1538 2562** - row 4:
**1538 1538 1538 1538 2562 2562 2562 2562** - row 5:
**2562 2562 2562 2562 1538 1538 1538 1538** - ...

So, the first zigzag_{3} down path sums are:

- row 1:
**1538 1538 1538 1538 2562 2562 2562 2562** - row 2:
**1538 2562 2562 1538 2562 1538 1538 2562** - row 3:
**1538 2562 2562 1538 2562 1538 1538 2562** - ...

And, the first zigzag_{2} down path sums are:

- row 1:
**1538 1538 1538 1538 2562 2562 2562 2562** - row 2:
**1538 2562 2562 1538 2562 1538 1538 2562** - ...

For the first square, (zigzag_{5} only), pairs of the sums, (1984 2116) and (1988 2112), total 4100.
These pairs are distributed such that there are
4 of them in every zigzag_{5} path, but not in the zigzag_{3} or zigzag_{2} paths.

For example, the first zigzag_{5} down and right path sums are:

- row 1:
**1984 1988 2112 2116 1984 1988 2112 2116** - row 2:
**2116 2112 1988 1984 2116 2112 1988 1984** - row 3:
**1988 1984 2116 2112 1988 1984 2116 2112** - row 4:
**2112 2116 1984 1988 2112 2116 1984 1988** - row 5:
**1984 1988 2112 2116 1984 1988 2112 2116** - ...

- col 1:
**1984 2116 1988 2112 1984 2116 1988 2112** - col 2:
**1988 2112 1984 2116 1988 2112 1984 2116** - col 3:
**2112 1988 2116 1984 2112 1988 2116 1984** - col 4:
**2116 1984 2112 1988 2116 1984 2112 1988** - col 5:
**1984 2116 1988 2112 1984 2116 1988 2112** - ...

So, the first zigzag_{3} down path sums are:

- row 1:
**1984 1988 2112 2116 1984 1988 2112 2116** - row 2:
**2116 2112 1988 1984 2116 2112 1988 1984** - row 3:
**1988 1984 2116 2112 1988 1984 2116 2112** - ...

And, the first zigzag_{2} down path sums are:

- row 1:
**1984 1988 2112 2116 1984 1988 2112 2116** - row 2:
**2116 2112 1988 1984 2116 2112 1988 1984** - ...

For wavelength 2, waves with bigger amplitudes can also be considered as zigzag
if only the crest and trough cells are included in the magic pattern.
If a square is zigzagA_{j} for a specific
value **j**, it is also zigzagA_{k} for k = j, 2j-1, 3j-2,..., <= n.
So, a square that is zigzag_{2} is zigzagA_{k} for k = 2,3,4,5,..., <= n.

If a square is not zigzag_{2}, it can be
zigzagA_{j} for some other value, **j**.
This can happen when the order n is evenly divisible by j-1. For example, an order 16
square that is not zigzag_{2} can be zigzagA_{5}. It is then also
zigzagA_{9} and zigzagA_{13}.

There are 12 4x4
zigzagA_{3} 2-way magic squares. They are bent diagonal 2-way, self-complement squares.

Here are some 8x8
zigzagA_{3} 2-way magic squares. They include bent diagonal 2-way squares.

In this example of an order 8 zigzagA_{5}, the sums of alternating cells in the
columns are all half the magic constant. Therefore, it is also zigzag_{2} 2-way
(left, right). This is not generally the case. Some other known combinations of these sums
are:

- column (126,134)(134,126) row (126,134)(134,126)
- column (128,132)(132,128) row (126,134)(134,126)
- column (132,128)(128,132) row (130,130)
- column (134,126)(126,134) row (126,134)(134,126)

Here are some zigzagA_{5}
8x8,
12x12,
16x16,
32x32
squares.

The 8x8 include adjacent corner, pandiagonal, bent diagonal, bent diagonal 2-way,
and zigzag_{2} 2-way squares.

The 12x12 include adjacent corner, associative, pandiagonal, pandiagonal 1-way,
bent diagonal, bent diagonal 2-way, zigzag_{2} 2-way, and
zigzag_{4} 2-way squares.

The 16x16 include associative, pandiagonal, bent diagonal, bent diagonal 2-way,
zigzag_{2} 2-way, zigzag_{2,3} 2-way, self-complement, and
bimagic squares.

The 32x32 include pandiagonal, bent diagonal, bent diagonal 2-way,
zigzag_{5}, and zigzag_{5} 2-way squares.

Campbell, Dwane H. and Keith A. Campbell "ORDER-2^{p} SQUARES"
http://magictesseract.com./large_squares

Dudeney, Henry E. "Magic Square Problems"

http://www.web-books.com/Classics/Books/B0/B873/AmuseMathC14P1.htm

Heinz, Harvey "Order 4 Magic Squares"

http://www.magic-squares.net/order4list.htm#The 12 Groups