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 A104157 #26 Nov 17 2018 19:50:34 %S A104157 2,0,1480028129,31,13,7,7,79,37,23,67,89,13,89,131,31,71,47,43,73,277, %T A104157 353,41,67,127,223,79,13,193,5,23,43,5,67,3,19,5,59,59,653,19,19,97, %U A104157 409,5,383,29,137,379,349,653,1187,47,41,37,17,619,89,283,283,43,479,191 %N A104157 Smallest of n^2 consecutive primes that form an n X n magic square with the least magic constant, or 0 if no such magic square exists. %C A104157 The magic constants (= sums) are given in A073520. For a given sum, the corresponding list of primes (and thus also the smallest one) is easily calculated, cf. PARI code. - _M. F. Hasler_, Oct 29 2018 %D A104157 H. L. Nelson, Journal of Recreational Mathematics, 1988, vol. 20:3, p. 214. %D A104157 Clifford A. Pickover, The Zen of Magic Squares, Circles and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002. %H A104157 Harvey Heinz, <a href="http://www.magic-squares.net/primesqr.htm">Prime Magic Squares</a> %H A104157 Stefano Tognon, <a href="http://digilander.libero.it/ice00/magic/prime/orderConstant.html">Table for prime magic squares</a> %H A104157 <a href="/index/Mag#magic">Index entries for sequences related to magic squares</a> %F A104157 Conjecture: for n > 4, a(n) = prime(s) where s > 1 is the smallest integer such that (Sum_{i=s..s+n^2-1} prime(i))/n is an integer of the same parity as n. - _Max Alekseyev_, Jan 29 2010 %F A104157 a(n) = prime(i) such that Sum_{k=0..n^2-1} prime(i+k) = n*A073520(n). - _M. F. Hasler_, Oct 29 2018 %o A104157 (PARI) A104157(n)=MagicPrimes(A073520[n],n)[1] \\ See A073519 for MagicPrimes(). This code uses a precomputed array A073520, but in practice one would rather compute that sequence as function of this one. - _M. F. Hasler_, Oct 29 2018 %Y A104157 Cf. A073519 or A320873 (the square for 3 X 3), A073520 (magic sums for 4 X 4 squares of consecutive primes), A073521 (consecutive primes of a 4 X 4 magic square), A073522 (consecutive primes of a (non minimal!) 5 X 5 magic square), A073523 (consecutive primes of a pandiagonal 6 X 6 magic square). %K A104157 hard,nonn %O A104157 1,1 %A A104157 _Robert G. Wilson v_, Mar 09 2005 %E A104157 a(5)-a(6) corrected, a(7)-a(20) added by _Max Alekseyev_, Sep 24 2009 %E A104157 Definition edited by _N. J. A. Sloane_, Oct 03 2009 %E A104157 More terms from _Max Alekseyev_, Jan 29 2010