login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320874 Lexicographically first 4 X 4 pandiagonal magic square made of consecutive primes. 3

%I #24 Apr 17 2022 03:54:58

%S 170693941183817,170693941183933,170693941183949,170693941183981,

%T 170693941183979,170693941183951,170693941183847,170693941183903,

%U 170693941183891,170693941183859,170693941184023,170693941183907,170693941183993,170693941183937,170693941183861,170693941183889

%N Lexicographically first 4 X 4 pandiagonal magic square made of consecutive primes.

%C This is also the 4 X 4 pandiagonal magic square made of consecutive primes which has the smallest possible magic constant (= sum), 682775764735680 = A256234(1). (In the present case there is no other non-equivalent pandiagonal 4 X 4 magic square having the same magic sum, but this could be possible as for rows 7 and 8 of A320872.)

%C There exist many non-pandiagonal 4 X 4 magic squares composed of consecutive primes with much smaller magic constant, the smallest being A073520(4) = 258.

%C Pandiagonal means that not only the 2 main diagonals, but also the 6 other "broken" diagonals all have the same sum, Sum_{i=1..4} A[i,M4(k +- i)] = 682775764735680 for k = 1, ..., 4 and M4(x) = y in {1, ..., 4} such that y == x (mod 4).

%C A pandiagonal magic square allows rotations (but not arbitrary cyclic permutations like, e.g., 1 -> 3 -> 4 -> 1) of columns or rows, as well as reflection on the 4 symmetry axes of the square (which also produce rotations of 90 degrees around the center of the square). Among all these variants of this square, there is none with elements coming earlier than (170693941183817, 170693941183933, ...), cf. PROGRAM for explicit verification.

%C The same 4 X 4 primes are given in increasing order in sequence A245721. But does not give more information than smallest term, the central term, or the magic constant itself (cf. A256234) which uniquely determines the sequence of primes (cf. PARI code) since they have to be consecutive and their sum is equal to 4 times the magic constant. The present sequence gives the full information about the magic square, and the given PARI code allows the production of all "equivalent" variants of the square.

%D Allan W. Johnson, Jr., Journal of Recreational Mathematics, vol. 23:3, 1991, pp. 190-191.

%D Clifford A. Pickover, The Zen of Magic Squares, Circles and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002.

%H Harvey Heinz, <a href="http://www.magic-squares.net/primesqr.htm">Prime Magic Squares</a>

%H <a href="/index/Mag#magic">Index entries for sequences related to magic squares</a>

%e The magic square is

%e [ 170693941183817 170693941183933 170693941183949 170693941183981 ]

%e [ 170693941183979 170693941183951 170693941183847 170693941183903 ]

%e [ 170693941183891 170693941183859 170693941184023 170693941183907 ]

%e [ 170693941183993 170693941183937 170693941183861 170693941183889 ]

%o (PARI) /* the following transformation operators for matrices, together with transposition, allow the production of all (24 for n=4) variants of a (pandiagonal) magic square */

%o REV(M)=matconcat(Vecrev(M)) \\ reverse the order of columns of M

%o FLIP(M)=matconcat(Colrev(M)) \\ reverse the order of rows of M

%o ROT(M,k=1)=matconcat([M[,k+1..#M],M[,1..k]]) \\ rotate left by k (default: 1) columns

%o ALL(M)=Set(concat(apply(M->vector(#M,k,ROT(M,k)),[M,M~,REV(M),REV(M~),FLIP(M),FLIP(M~)]))) \\ PARI orders the set according to the (first) columns of the matrices, so one must take the transpose to get them ordered according to elements of the first row.

%o \\ The set of primes is A245721=MagicPrimes(682775764735680,4), cf. A073519.

%Y Cf. A073519 and A320873, A073521, A073522 (3 X 3, 4 X 4 and 5 X 5 consecutive primes), A073523 and A320876 (6 X 6 consecutive primes, pandiagonal magic square).

%Y Cf. A210710: Minimal index of a Stanley antimagic square of order n consisting of distinct primes.

%Y Cf. A073520: Smallest magic sum for an n^2 magic square made of consecutive primes.

%Y Cf. A104157: Smallest of n X n consecutive primes forming a magic square.

%Y Cf. A256234: Magic sums of 4 X 4 pandiagonal magic squares of consecutive primes.

%K nonn,fini,full

%O 1,1

%A _M. F. Hasler_, Oct 22 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 16:22 EDT 2024. Contains 371780 sequences. (Running on oeis4.)