an $N \times N$ matrix with positive integral entries

A magic square of order $N$ is an $N \times N$ matrix with positive integral entries such that the elements of every row, every column and the two diagonals all add up to the same number. If a magic square is filled with numbers in arithmetic progression starting with $a \in N$ and common dierence $d \in N$, what is the value of this common sum?

I am stuck on this problem. Can anyone help me please...

-
You do remember the formula for the sum of an arithmetic progression, don't you? Or better yet, how to derive that formula! –  Jyrki Lahtonen Jan 5 '13 at 9:39

Let the commom sum be $C$. So $C$ is also the common row sum. There are $N$ rows. So the sum of all entries in the matrix is equal to $NC$. Hence $NC=a+(a+d)+(a+2d)+\ldots+(a+(N^2-1)d)$ and I will leave the rest to you.