

A051235


Number of essentially different mostperfect pandiagonal magic squares of order 4n.


1



1, 48, 368640, 22295347200, 932242784256000, 144982397807493120000, 221340898613898982195200000, 21421302878528360015430942720000, 59225618198555209770663470432256000000
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

A mostperfect magic square is a pandiagonal magic square made of the numbers 1 to N^2, N = 4n, such that (1) each 2×2 subsquare, including wrapround, sums to S/n, where S = N(N^2 + 1)/2 is the magic sum; and (2) all pairs of integers distant N/2 along any diagonal (major or broken) are complementary, i.e., they sum to N^2 + 1.  M. F. Hasler, Oct 20 2018


REFERENCES

K. Ollerenshaw and D. S. Bree, Mostperfect Pandiagonal Magic Squares: Their Construction and Enumeration, Inst. Math. Applic., SouthendonSea, England, 1998.
I. Stewart, Mostperfect magic squares, Sci. Amer., Nov. 1999, pp. 122123.


LINKS

Table of n, a(n) for n=0..8.
Index entries for sequences related to magic squares


FORMULA

Let N = 4n = Product{g}[(p_g)^(s_g)] (p_g prime) and let W_v(n) = Sum{0 <= i <= v1}[(1)^{v+i}BINOM(v+1, i+1)*Product{g}BINOM(s_g+i, i)] then a(n) = 2^(N2)*(2n)!^2*Sum{0 <= v < Sum{g}s_g}[W_v(N)(W_v(N)+W_{v+1}(N))].
The above formula cannot be correct: For n = 0, the factorization is empty, then so is the sum in a(n), whence a(1) = 0 and not 1 as expected. For n = 1 => N = 4 = 2^2, Sum(s_g) = 2; the sum in a(n) is over v = 0 and v = 1, but W_0 = 0 (empty sum, 0 <= i <= 1), W_1 = sum_{0 <= i= <= 0}, (1)^(1) C(2,1)*C(2+0,0) = 2, W_2 = (1)^2 C(3,1)*C(2,0) + (1)^3 C(3,1)*C(3,1) = 6, so a(1) = 2^(2)*2!^2*(0 + (2)*(2+6)) = 256 and not 48, as expected.  M. F. Hasler, Oct 20 2018


PROG

(PARI) a(n)={my(s=factor(4*n)[, 2], W=vector(vecsum(s)+1, V, sum(i=0, V2, (1)^(Vi1)*binomial(V, i+1)*prod(g=1, #s, binomial(s[g]+i, i))))); print(W); 2^(4*n2)*(2*n)!^2*sum(V=1, #W1, (W[V]+W[V+1])*W[V])} \\ Implements the formula, where our W has indices V = v+1 = 1..Sum(s_g)+1 instead of 0..Sum(s_g), for technical reasons. DOES NOT PRODUCE THE TERMS, cf. FORMULA.  M. F. Hasler, Oct 20 2018


CROSSREFS

Sequence in context: A146204 A269561 A079234 * A282403 A254625 A165643
Adjacent sequences: A051232 A051233 A051234 * A051236 A051237 A051238


KEYWORD

nonn,easy,changed


AUTHOR

N. J. A. Sloane.


EXTENSIONS

Formula and more terms from Floor van Lamoen, Aug 16 2001


STATUS

approved



