The magic squares of order two
ProvedMagicSquares.magic_count_twocombinatoricsenumerative-combinatoricsmagic-squares
The order-two magic count. Writing for the number of arrays of nonnegative integers whose rows, columns and two main diagonals all sum to , the theorem states
The single square is the constant array with every entry . Proof. In the family the two diagonals read and ; requiring both to equal forces . This is the first instance of the divisibility obstruction that governs every magic-square count: the diagonal conditions are not automatic, and they vanish off a sublattice of line sums.
Preamble
import Mathlib import Definitions.Def_MagicSquares import Definitions.Def_MagicSquaresPandiagonal open MagicSquares
Formal statement
namespace MagicSquares theorem magic_count_two (t : ℕ) : magicCount 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).