magic square with number theory and sequences& series

211 Views Asked by At

A magic square of size N, N ≥ 2, is an N × N matrix with integer entries such that the sums of the entries of each row, each column and the two diagonals are all equal. If the entries of the magic square are made up of integers in arithmetic progression with first term a and common difference d, what is the value of this common sum?

I am thinking that answer should be Na but answer given in my handbook is N/2(2a+(N^2-1)d). please help me to give an idea to start the problem.