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.
%I A320876 #10 Apr 17 2022 03:55:02 %S A320876 67,139,241,73,199,211,193,233,97,167,103,137,71,113,191,131,227,197, %T A320876 251,181,89,229,101,79,109,157,163,151,127,223,239,107,149,179,173,83 %N A320876 Lexicographically first 6 X 6 pandiagonal magic square made of consecutive primes with the smallest magic constant (930). %C A320876 The same 6 X 6 terms are given in increasing order in sequence A073523. But giving them in increasing order does not contain more information as the smallest of them or magic constant (= sum) itself, which uniquely determines the sequence of primes since they have to be consecutive and their sum is equal to 6 times the magic constant. The present sequence gives the full information about the magic square. %C A320876 A pandiagonal magic square allows rotations (rather than arbitrary cyclic permutations) of columns or rows, as well as reflection on the 4 symmetry axes of the square. Considering all these variants of this square, there is none with elements coming earlier than (67, 139, ...) %C A320876 There exist non-pandiagonal 6 X 6 magic squares composed of consecutive primes with smaller magic constant, the smallest being A073520(6) = 484. %C A320876 Pandiagonal means that not only the 2 main diagonals, but all other 10 diagonals also have the same sum, Sum_{i=1..6} A[i,M6(k +/- i)] = 930 for k = 1, ..., 6 and M6(x) = y in {1, ..., 6} such that y == x (mod 6). %D A320876 Allan W. Johnson, Jr., Journal of Recreational Mathematics, vol. 23:3, 1991, pp. 190-191. %D A320876 Clifford A. Pickover, The Zen of Magic Squares, Circles and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002. %H A320876 Harvey Heinz, <a href="http://www.magic-squares.net/primesqr.htm">Prime Magic Squares</a> %H A320876 <a href="/index/Mag#magic">Index entries for sequences related to magic squares</a> %e A320876 The magic square is %e A320876 [ 67 139 241 73 199 211] %e A320876 [193 233 97 167 103 137] %e A320876 [ 71 113 191 131 227 197] %e A320876 [251 181 89 229 101 79] %e A320876 [109 157 163 151 127 223] %e A320876 [239 107 149 179 173 83] %o A320876 (PARI) /* the following transformation operators for matrices, together with transposition, allow the production of all variants of a (pandiagonal) magic square */ %o A320876 REV(M)=matconcat(Vecrev(M)) \\ reverse the order of columns of M %o A320876 FLIP(M)=matconcat(Colrev(M)) \\ reverse the order of row of M %o A320876 ROT(M,k=1)=matconcat([M[,k+1..#M],M[,1..k]]) \\ rotate left by k (default: 1) columns %o A320876 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 A320876 MagicPrimes(S=930,n=6,P=[nextprime(S\n)])={S=n*S-P[1];for(i=1,-1+n*=n,S-=if(S>(n-i)*P[1],P=concat(P,nextprime(P[#P]+1));P[#P],P=concat(precprime(P[1]-1),P);P[1]));if(S,-P,P)} \\ The vector of n^2 primes whose sum is n*S (= A073523 for default values), or a negative vector of "best approximation" if there is no exact solution. %Y A320876 Cf. A073519, A073520, A073521, A073522. %K A320876 nonn,fini,full %O A320876 1,1 %A A320876 _M. F. Hasler_, Oct 22 2018