
A magic square filled with consecutive primes - ColinWright
http://www.johndcook.com/blog/2013/09/02/a-magic-square-filled-with-consecutive-primes/
======
tpurves
For reference, the 1988 Cray Super computer at "333 MegaFlops" put's it's
performance somewhere in the range of last year's iPhone5 (depending on which
sort of flop operation you are crunching). I actually think that speaks pretty
highly for the Cray. In 1988, a CRAY supercomputer might have almost been
enough to run iOS7. However battery life and pocketability would have been
somewhat an issue. Also cost at ~10M $ 1988 dollars was pretty expensive, even
though it DID come with some brightly colored casing options.

some iPhone5 MFLOP benchmarks: [http://www.anandtech.com/show/6330/the-
iphone-5-review/5](http://www.anandtech.com/show/6330/the-iphone-5-review/5)

CRAY YP: [https://en.wikipedia.org/wiki/Cray_Y-
MP](https://en.wikipedia.org/wiki/Cray_Y-MP)

~~~
astrodust
That's 333 MFLOPS _per_ vector processor, so configured with 8 that'd put it
significantly ahead of the phone.

------
mikejarema
I don't believe the article defines a magic square (nor was I aware). A magic
square is a n by n grid of numbers where each individual row, column, and
diagonal add up to the same value.

[http://en.wikipedia.org/wiki/Magic_square](http://en.wikipedia.org/wiki/Magic_square)

~~~
cjauvin
I recently posted a small example showing how to construct a magic square of
odd degree using a surprisingly simple algorithm called De la Loubère (or
sometimes also the Siamese method), with Python:

[http://cjauvin.blogspot.ca/2013/09/siamese-
dream.html](http://cjauvin.blogspot.ca/2013/09/siamese-dream.html)

------
Isamu
I was intrigued by the nextprime() function and had to look it up.

It depends on an isprime() function that in turn relies on the Miller-Rabin
test, discussed here:
[http://primes.utm.edu/prove/prove2_3.html](http://primes.utm.edu/prove/prove2_3.html)

Interesting that it combines a number of weak, probabilistic tests into a
strong test (for n < 1e16)

------
jessaustin
I wonder if the $100 was enough to pay for the time on the Cray?

