cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A245721 The set of 16 consecutive primes forming a 4 X 4 pandiagonal magic square with the smallest magic constant, 682775764735680 = A256234(1).

Original entry on oeis.org

170693941183817, 170693941183847, 170693941183859, 170693941183861, 170693941183889, 170693941183891, 170693941183903, 170693941183907, 170693941183933, 170693941183937, 170693941183949, 170693941183951, 170693941183979, 170693941183981, 170693941183993, 170693941184023
Offset: 1

Views

Author

Max Alekseyev, Jul 30 2014

Keywords

Comments

Also, the set of 16 smallest consecutive primes forming a 4x4 Stanley antimagic square.
The set of primes is uniquely and straightforwardly determined by the magic sum, here A256234(1), cf. PROGRAM. See A320874 for the ordered list, i.e., the lexicographic smallest magic square made of these primes. - M. F. Hasler, Oct 23 2018

Examples

			A pandiagonal magic square formed by these primes:
  170693941183817 170693941183933 170693941183949 170693941183981
  170693941183979 170693941183951 170693941183847 170693941183903
  170693941183891 170693941183859 170693941184023 170693941183907
  170693941183993 170693941183937 170693941183861 170693941183889
A Stanley antimagic square formed by these primes:
  170693941183817 170693941183859 170693941183907 170693941183949
  170693941183847 170693941183889 170693941183937 170693941183979
  170693941183861 170693941183903 170693941183951 170693941183993
  170693941183891 170693941183933 170693941183981 170693941184023
		

Crossrefs

Cf. A320874 (the square made of the set of primes given here).
Cf. A073519 or 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).
Cf. A210710: Minimal index of a Stanley antimagic square of order n consisting of distinct primes.
Cf. A073520: Smallest magic sum of a magic square made of n^2 consecutive primes.
Cf. A104157: Smallest of n X n consecutive primes forming a magic square.
Cf. A256234: Magic sums of 4 X 4 pandiagonal magic squares of consecutive primes.

Programs

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

Original entry on oeis.org

170693941183817, 170693941183933, 170693941183949, 170693941183981, 170693941183979, 170693941183951, 170693941183847, 170693941183903, 170693941183891, 170693941183859, 170693941184023, 170693941183907, 170693941183993, 170693941183937, 170693941183861, 170693941183889
Offset: 1

Views

Author

M. F. Hasler, Oct 22 2018

Keywords

Comments

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.)
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.
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).
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.
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.

Examples

			The magic square is
  [ 170693941183817 170693941183933 170693941183949 170693941183981 ]
  [ 170693941183979 170693941183951 170693941183847 170693941183903 ]
  [ 170693941183891 170693941183859 170693941184023 170693941183907 ]
  [ 170693941183993 170693941183937 170693941183861 170693941183889 ]
		

References

  • Allan W. Johnson, Jr., Journal of Recreational Mathematics, vol. 23:3, 1991, pp. 190-191.
  • Clifford A. Pickover, The Zen of Magic Squares, Circles and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002.

Crossrefs

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).
Cf. A210710: Minimal index of a Stanley antimagic square of order n consisting of distinct primes.
Cf. A073520: Smallest magic sum for an n^2 magic square made of consecutive primes.
Cf. A104157: Smallest of n X n consecutive primes forming a magic square.
Cf. A256234: Magic sums of 4 X 4 pandiagonal magic squares of consecutive primes.

Programs

  • 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 */
    REV(M)=matconcat(Vecrev(M)) \\ reverse the order of columns of M
    FLIP(M)=matconcat(Colrev(M)) \\ reverse the order of rows of M
    ROT(M,k=1)=matconcat([M[,k+1..#M],M[,1..k]]) \\ rotate left by k (default: 1) columns
    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.
    \\ The set of primes is A245721=MagicPrimes(682775764735680,4), cf. A073519.

A225133 Minimal index of order n Stanley's antimagic square composed of Smith numbers.

Original entry on oeis.org

4, 143, 669, 2088, 8318, 30885, 87643
Offset: 1

Views

Author

Natalia Makarova, Apr 29 2013

Keywords

Comments

Stanley antimagic square of index d and order n is an n X n matrix where the sum of any n matrix elements in pairwise distinct rows and pairwise distinct columns equals d.

Examples

			Examples of order n Stanley's antimagic squares with minimal index S composed of Smith numbers:
.
n=2, S=143
  22  58
  85 121
.
For n=3, S=669 we have:
   22  58 202
   85 121 265
  346 382 526
Here 22+121+526 = 22+265+382 = 58+265+346 = 58+85+526 = 202+121+346 = 202+85+382 = 669.
.
n=4, S=2088
   85  94 121 517
  346 355 382 778
  526 535 562 958
  654 663 690 1086
.
n=5, S=8318 (author V. Pavlovsky)
    58  121  382  562 1111
   202  265  526  706 1255
   454  517  778  958 1507
  1858 1921 2182 2362 2911
  3802 3865 4126 4306 4855
.
n=6, S=30885
    319   346  1642  1678  1966  3226
    535   562  1858  1894  2182  3442
   1255  1282  2578  2614  2902  4162
   3595  3622  4918  4954  5242  6502
   4279  4306  5602  5638  5926  7186
  13639 13666 14962 14998 15286 16546
.
n=7, S=87643 (author J. K. Andersen)
    454   634  1858  2614  4054  4414 16474
   1642  1822  3046  3802  5242  5602 17662
   2038  2218  3442  4198  5638  5998 18058
   5674  5854  7078  7834  9274  9634 21694
   5935  6115  7339  8095  9535  9895 21955
  20362 20542 21766 22522 23962 24322 36382
  24214 24394 25618 26374 27814 28174 40234
		

Crossrefs

Showing 1-3 of 3 results.