2
$\begingroup$

(Again copied verbatim from a September 2009 thread I made.)

A Primally Magic Square (PMS) is exactly like a traditional magic square with a change of criteria. Where a traditional magic square is one where the sum of each row, column, and both diagonals are some number, usually 15 (uses 1-9). By contrast, a PMS is one where all rows, columns, and both diagonals form a prime number. Note: if a number is prime either forward or back, it counts.

Example:

$\displaystyle \begin{matrix} 1 & 3 & 7 \\ 3 & 9 & 7 \\ 7 & 7 & 9 \end{matrix}$

137, 397, 977, 797, and 199 are all prime, so this square is a PMS.

How many 3x3 PMS's are there?

How many 4x4 PMS's are there?

How many 5x5 PMS's are there?

How many 9x9 PMS's are there?

Side note: Feel free to calculate the number of PMS's for some other $n$.

  • 0
    Why are you not interested in 6x6 through 8x8 PMSs? And what about 2x2?2011-05-08
  • 0
    Is it obvious that there is at least one PMS of each of those size? For 2 by 2 PMS, you can fill a square with ones for example.2011-05-08
  • 0
    @Matthew: Feel free to calculate those too. :P @Joel: Given the increasing number of primes as $n$ increases, I think there should be at least one PMS.2011-05-08
  • 1
    @ El'endia Starman : Doesn't the proportion of primes (among numbers with $n$ digits) decreases as $\frac{9}{n}$ asymptotically?2011-05-08
  • 0
    @Joel: Yes, but the absolute number of primes increases, so that should compensate for the increasing difficulty of making a PMS.2011-05-08
  • 0
    @ El'endia Starman: Have you tried writing a program to count them? This is absolutely doable for at least smaller $n$.2011-05-09
  • 0
    @Matthew: Hmmm...good point. It HAS been about a year and a half and my programming skills have definitely improved in that time... :P2011-05-09
  • 0
    On reddit someone did a bruteforce search of the 3by3's [here](http://www.reddit.com/r/math/comments/f41l3/theres_a_magic_square_prime_of_length_9/) and a commenter found 2 4by4s [here](http://www.reddit.com/r/math/comments/f41l3/theres_a_magic_square_prime_of_length_9/c1fdrjb).2011-05-18
  • 0
    @Jacob: Nice links! Those are not quite what I'm going for here though; my condition is merely that each column, row, and diagonal needs to be prime in at least one direction, not both as they did.2011-05-18

0 Answers 0