Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A magic square of order $N$ is an $N\times N$ matrix with positive integral entries such that the elements of every row, every collumn and the two diagonals all add up to the same number. If a magic square is filled with numbers in AP starting with $a\in\mathbb{N}$ and common difference $d\in \mathbb{N}$ what is the value of this common sum? I am thinking that it is just a sum of the AP given? I mean $\frac{N}{2}[2a+(N-1)d]$, am I right?

share|cite|improve this question
up vote 2 down vote accepted

Let $s$ be the common sum. Then each row sums to $s$, and there are $N$ rows, so the sum of all the numbers in the square is $Ns$. That is,


and $$s=\frac{N}2\Big(2a+(N^2-1)d\Big)\;.$$

(Note that you miscounted the number of terms in the sequence when you wrote down your expression for the sum.)

share|cite|improve this answer
I dont understand why you have written $(N^2-1)$, as total number of entries $N^2$ thatswhy? – La Belle Noiseuse Oct 3 '12 at 8:14
@Flute: Yes: the arithmetic progression has $N^2$ terms, so if $a$ is the first term and $d$ the common difference, the last term is $a+(N^2-1)d$. – Brian M. Scott Oct 3 '12 at 8:22
thank you Brian – La Belle Noiseuse Oct 3 '12 at 8:23
@Flute: You’re welcome. – Brian M. Scott Oct 3 '12 at 8:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.