Counting admissible MacMahon parameters for 3x3 squares
ProvedMagicSquares.param_three_cardcombinatoricsenumerative-combinatoricsmagic-squares
The number of admissible MacMahon parameter pairs for line sum is
Proof. Substituting and , the four inequalities read and , and since this is exactly : the ball of radius in . On the sphere there are lattice points for and one for , so the ball has
points.
Equivalently one may sum over : for fixed the admissible form the interval , which has elements when and elements when ; summing gives .
Formalization Note paramCount e is the cardinality of the finset
paramSet e, defined by filtering the box — the bounds
are implied by admissibility, so this is lossless.
Preamble
import Mathlib import Definitions.Def_MagicSquares import Definitions.Def_MagicSquaresParam3 open MagicSquares
Formal statement
namespace MagicSquares
theorem param_three_card (e : ℕ) :
paramCount e = 2 * e ^ 2 + 2 * e + 1 := by sorry
end MagicSquaresSource
P. A. MacMahon, Combinatory Analysis (1915): for .
Human review
Confirmed by the mission captain (proposal self-audit).