No 3x3 magic square has a line sum coprime to 3
ProvedMagicSquares.magic_count_three_otherwisecombinatoricsmagic-squares
If is not divisible by , there is no magic square with line sum .
Write for the number of arrays of nonnegative integers whose three rows, three columns and two main diagonals all sum to . Then
This is an immediate consequence of the fact that the centre entry satisfies
; see MagicSquares.center_of_order_three. Together with
MagicSquares.magic_count_three_divisible this determines completely.
Preamble
import Mathlib import Definitions.Def_MagicSquares open MagicSquares
Formal statement
namespace MagicSquares
theorem magic_count_three_otherwise (t : ℕ) (ht : ¬ 3 ∣ t) :
magicCount 3 t = 0 := by sorry
end MagicSquaresSource
Beck, Cohen, Cuomo & Gribelyuk, The number of ``magic'' squares, cubes and hypercubes, Amer. Math. Monthly 110 (2003), 707-717; arXiv:math/0201013v3, Section 2, MacMahon's formula for (1915).