OFFSET
1,1
COMMENTS
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
REFERENCES
H. L. Nelson, Journal of Recreational Mathematics, 1988, vol. 20:3, p. 214.
Clifford A. Pickover, The Zen of Magic Squares, Circles and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002.
LINKS
Harvey Heinz, Prime Magic Squares
Stefano Tognon, Table for prime magic squares
FORMULA
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
a(n) = prime(i) such that Sum_{k=0..n^2-1} prime(i+k) = n*A073520(n). - M. F. Hasler, Oct 29 2018
PROG
(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
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
Robert G. Wilson v, Mar 09 2005
EXTENSIONS
a(5)-a(6) corrected, a(7)-a(20) added by Max Alekseyev, Sep 24 2009
Definition edited by N. J. A. Sloane, Oct 03 2009
More terms from Max Alekseyev, Jan 29 2010
STATUS
approved