Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The magic constant of a normal 3x3 magic square is 15

Proved
MagicSquares.normal_order_three_constant

by Yuxuan Xu · Sep 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsmagic-squares

Every normal 3×33 \times 33×3 magic square has line sum 151515.

A normal magic square of order 333 has entries exactly 1,2,…,91, 2, \dots, 91,2,…,9, each used once. Its magic constant is therefore

13 (1+2+⋯+9)=453=15.\frac{1}{3}\,(1 + 2 + \cdots + 9) = \frac{45}{3} = 15 .31​(1+2+⋯+9)=345​=15.

This is the n=3n = 3n=3 instance of the general magic-constant identity 2s=n(n2+1)2s = n(n^{2}+1)2s=n(n2+1), which here reads 2s=3⋅10=302s = 3 \cdot 10 = 302s=3⋅10=30.

Formalization Note The statement avoids division: with the hypothesis IsNormal M and IsMagic M s the general identity gives 2 * s = 30, and s = 15 follows by linear arithmetic over N\mathbb{N}N.

Preamble
import Mathlib
import Definitions.Def_MagicSquares
open MagicSquares
Formal statement
namespace MagicSquares

theorem normal_order_three_constant (M : Square 3 ℕ) (s : ℕ)
    (hN : IsNormal M) (hM : IsMagic M s) :
    s = 15 := by sorry

end MagicSquares
Source
Standard folklore on the Lo Shu square; the general identity is the magic-constant formula for normal magic squares.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me