The pandiagonal squares of order three: BCCG's P_3
ProvedMagicSquares.pandiagonal_count_threeThe order-three pandiagonal count. With as above, the theorem determines
a degree-two polynomial that never vanishes: for . This is Beck--Cohen--Cuomo--Gribelyuk's , and it sits inside their structural theorem that is a quasi-polynomial of degree (which is at ). Proof. Every pandiagonal square of line sum has the form for a single defined on : the broken-diagonal conditions run the three entries of each wrapped diagonal through the same cyclic pattern, and the line sum is then . So the count is the number of triples of naturals summing to , equivalently the number of pairs with , which is .
Contrast. This is not panMagicCount 3, which asks in addition that the ascending broken diagonals sum to the line sum; that stronger condition leaves only the constant square and gives a count vanishing off multiples of three,
import Mathlib import Definitions.Def_MagicSquares import Definitions.Def_MagicSquaresPandiagonal open MagicSquares
namespace MagicSquares theorem pandiagonal_count_three (t : ℕ) : pandiagonalCount 3 t = (t + 2).choose 2 := by sorry end MagicSquares