Combinarorics
posted by steve .
If we use 9 distinct numbers from 1 to 27 to make a 3 by 3 magic square, what is the most number of primes that we can use?

well, there are 10 primes, but I have no idea whether you can make a magic square with just primes.

My basic 3 by 3 magic square looks like this using the numbers form 1 to 9:
8 1 6
3 5 7
4 9 2 for a sum of 15 for all its rows, columns, and diagonals
Without changing the sum, I can use symmetry to have different versions of that
e.g
2 7 6
9 5 1
4 3 8
There is also a magic square where the numbers form a fixed product of the numbers in the rows, columns, and diagonals
eg.
http://mathworld.wolfram.com/MultiplicationMagicSquare.html
but I don't think you were thinking of that.
For a "normal" magic square, the numbers form an arithmetic sequence.
so with a common difference of 1 we could use
19 , number of primes = 4 ,
210 , 4 primes
311 , 4primes
412 , 3 primes
....
1927, 2 primes
There will be 19 of these magic squares, with the maximum number of primes in any one of them being 4
As soon as I make the common difference in the arithmetic sequence other than 1, e.g. 3
the numbers in the square would be multiples of that difference, hence no primes!
So primes can exist only if we have consecutive numbers.
I would say the max number of primes in any 3by3 magic square is 4
Steve mused if there was a magic square using only primes,
my guess is no, since the numbers must be in arithmetic sequence. 
it is also wrong. plss check it again

Can not a magic square be just a collection of random numbers that work magically? I was not aware that they had to be in arithmetic sequence.

If we require an arithmetic sequence, then just lay a sliding scale over the numbers from 127 and see which string of 9 contains the most primes.

Steve, back in the 80's when I was teaching a computer science course using GWBasic on a "Trash 80" , I recall an assignment where using any number from 1 to 50, they were to find a magic square using a random number generator of size 5by5.
Of course the processor was so slow that we actually had to run the machines all night and wait to next day to get any results. We observed that for all results, the numbers were always consecutive numbers.
This does not prove it, but indicates strong indication it might be true.
You also stated that I was wrong in my reply, I can't find my error. 
Note that the assertion of error, came from "steve" not from "Steve"
Identity Theft!!!!
Back in the 60's when I was in HS, the CS class had to punch up their FORTRAN programs on cards, send them to Olympia for processing, and wait several days for the results. Now THAT's slow turnaround!
Luckily, I was a math geek back then, and had no real interest in computers. How times change... 
so atlast what is the answer of my question? ???????