# Magic constant equation

1. Jun 3, 2010

### BobFijiwinkle

Hey all. I'm trying to convert a series which gives me the magic constant for a magic square into an equation. How would I go about doing this?

The series is:
$$\mbox{S}=\left[ \frac{n+1}{2}+\left( n-1 \right)n \right]$$

2. Jun 3, 2010

### sjb-2812

What do you mean by the magic constant? The sum - so for a 3 x 3 from 1-9 you want 15?

Simply sum 1 to n2, then divide by n?

3. Jun 4, 2010

### BobFijiwinkle

Yes, that's what I mean by the magic constant.

Yes, I know that, but I'm trying to derive the formula from the series to prove that that is correct.

BF

4. Jun 4, 2010

### sjb-2812

I'm not sure that it is. Plugging 3 into your formula gives 10, to say nothing of what happens if n is even.

What is the sum of 1 + 2 + 3 + ... a, where a is an integer?

5. Jun 4, 2010

### BobFijiwinkle

Let me get something clear.

I'm trying to prove that the magic constant is

$$M_{2}\left( n \right)\; =\; \frac{n\left( n^{2}+1 \right)}{2}$$

6. Jun 4, 2010

### sjb-2812

Ahh, that looks a lot more like the formula I've got.

To explain where I'm coming from with my request for the sum of 1 + 2 + 3 + ... a (hint Gauss), if you sum these, then divide by the number of rows / colums you ought to get somewhere. I didn't want to say the sum of 1 to n2, in case it got confused as 1 + 4 + 9 etc.