4 ms·
A magic square filled with consecutive primes
- mikejarema 13y agoI 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
- samatman 13y agoIf you're interested in why they're called "magic" squares, search for "Agrippa" on the Wiki page. The history of mathematics is chock full of such curiosities.
- cjauvin 13y agoI 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
- deleted 13y ago[deleted]
- tpurves 13y agoFor 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 13y agoThat's 333 MFLOPS per vector processor, so configured with 8 that'd put it significantly ahead of the phone.
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- hcarvalhoalves 13y agoA CPU capable of 333 Mflops, 512MB SRAM, optional 4GB SSD storage... it was like a computer from the future in 1988.
- phamilton 13y ago512MB SRAM is pretty fast and pretty expensive by todays standards. DRAM on the other hand...
- DanBC 13y agoYou can build your own "1/10-scale, binary-compatible, cycle-accurate Cray-1" replica (http://www.chrisfenton.com/homebrew-cray-1a/ http://www.chrisfenton.com/homebrew-cray-1a/) This is an earlier Cray, from mid 70s to early 80s. (https://en.wikipedia.org/wiki/Cray-1 https://en.wikipedia.org/wiki/Cray-1) I don't think there are any similar projects for other Cray machines?
- pmiller2 13y agoYes, but your iPhone isn't nearly as cool to sit on.
- Isamu 13y agoI 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 13y agoI wonder if the $100 was enough to pay for the time on the Cray?