Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site sequent.UUCP Path: utzoo!watmath!clyde!burl!ulysses!unc!mcnc!decvax!ittvax!dcdwest!sdcsvax!bmcg!cepu!trwrba!trwrb!sdcrdcf!hplabs!tektronix!ogcvax!sequent!merlyn From: merlyn@sequent.UUCP Newsgroups: net.math Subject: Re: Magic Squares Message-ID: <481@sequent.UUCP> Date: Fri, 4-May-84 11:04:04 EDT Article-I.D.: sequent.481 Posted: Fri May 4 11:04:04 1984 Date-Received: Tue, 8-May-84 03:28:26 EDT References: <551@aecom.UUCP> Organization: Sequent Computer Systems, Portland Lines: 30 > From: eliovson@aecom.UUCP > Message-ID: <551@aecom.UUCP> > Date: Tue, 1-May-84 19:30:38 PDT > > On 5/1 I was introduced to a technique for developing > the magic square... > ...When I sat down to write a program for the following I ran into > a small problem- does this only work with ODD squares? Yes, only ODD squares are possible with this method. It appears to be isomorphic with a method I learned long ago: 1. Starting at the middle square of the top row, label that square "1". 2. For each successive number, go up one and right one square, wrapping right side to left and top to bottom as necessary. 3. If the square in step 2 is already taken, backup and go DOWN one instead (from the original square, not the up-right one). 4. Fill in that square with the next higher number, and repeat. This one automatically generates any ODD-sized magic square. Evidently, even ones are harder to generate. I haven't seen an algorithm for them yet. I have a few special case ones, but that's about it. Randal L. ("Entertainment = MagiC^2") Schwartz, esq. (merlyn@sequent.UUCP) (Official legendary sorcerer of the 1984 Summer Olympics) Sequent Computer Systems, Inc. (503)626-5700 (sequent = 1/quosine) UUCP: ...!XXX!sequent!merlyn where XXX is one of: decwrl nsc ogcvax pur-ee rocks34 shell teneron unisoft vax135 verdix Original Material (C) 1984 by Randal L. Schwartz [ALL RIGHTS RESERVED]