This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A051235 Number of essentially different most-perfect pandiagonal magic squares of order 4n. 1

%I

%S 1,48,368640,22295347200,932242784256000,144982397807493120000,

%T 221340898613898982195200000,21421302878528360015430942720000,

%U 59225618198555209770663470432256000000

%N Number of essentially different most-perfect pandiagonal magic squares of order 4n.

%C A most-perfect magic square is a pan-diagonal magic square made of the numbers 1 to N^2, N = 4n, such that (1) each 2×2 subsquare, including wrap-round, 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

%D K. Ollerenshaw and D. S. Bree, Most-perfect Pan-diagonal Magic Squares: Their Construction and Enumeration, Inst. Math. Applic., Southend-on-Sea, England, 1998.

%D I. Stewart, Most-perfect magic squares, Sci. Amer., Nov. 1999, pp. 122-123.

%H <a href="/index/Mag#magic">Index entries for sequences related to magic squares</a>

%F Let N = 4n = Product{g}[(p_g)^(s_g)] (p_g prime) and let W_v(n) = Sum{0 <= i <= v-1}[(-1)^{v+i}BINOM(v+1, i+1)*Product{g}BINOM(s_g+i, i)] then a(n) = 2^(N-2)*(2n)!^2*Sum{0 <= v < Sum{g}s_g}[W_v(N)(W_v(N)+W_{v+1}(N))].

%F 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

%o (PARI) a(n)={my(s=factor(4*n)[,2],W=vector(vecsum(s)+1,V,sum(i=0,V-2,(-1)^(V-i-1)*binomial(V,i+1)*prod(g=1,#s,binomial(s[g]+i,i)))));print(W);2^(4*n-2)*(2*n)!^2*sum(V=1,#W-1,(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

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_.

%E Formula and more terms from _Floor van Lamoen_, Aug 16 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 23 16:52 EDT 2019. Contains 321432 sequences. (Running on oeis4.)