The pandiagonal squares of order two
ProvedMagicSquares.pandiagonal_count_twocombinatoricsenumerative-combinatoricsmagic-squares
The order-two pandiagonal count. With the number of pandiagonal squares of order and line sum in the counting-theory sense of IsPandiagonal (semi-magic plus the wrapped diagonals parallel to the main diagonal), the theorem states
Proof. At order two the two wrapped diagonals of a semi-magic square are exactly its main and anti-diagonal, so IsPandiagonal coincides with IsMagic and . This is the last order at which the two notions agree: from order three on they diverge.
Preamble
import Mathlib import Definitions.Def_MagicSquares import Definitions.Def_MagicSquaresPandiagonal open MagicSquares
Formal statement
namespace MagicSquares theorem pandiagonal_count_two (t : ℕ) : pandiagonalCount 2 t = if 2 ∣ t then 1 else 0 := by sorry end MagicSquares
Source
M. Beck, M. Cohen, J. Cuomo and P. Gribelyuk, The number of "magic" squares, cubes and hypercubes, Amer. Math. Monthly 110 (2003), 707--717 (arXiv:math/0201013).