

A051235


Number of distinct mostperfect pandiagonal magic squares of order 4n in the Frenicle standard form.


3



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 X 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
The mostperfect magic squares are in an onetoone correspondence with the reversible squares (cf. A308951).  Max Alekseyev, Jul 03 2019


REFERENCES

K. Ollerenshaw and D. S. Brée, 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

Max Alekseyev, Table of n, a(n) for n = 0..100
Steve Abbott, Review of Mostperfect Pandiagonal Magic Squares: Their Construction and Enumeration by Kathleen Ollerenshaw and David Brée, The Mathematical Gazette, Volume 82, Issue 495 November 1998 , pp. 535536.
Wikipedia, Mostperfect magic square
Wikipedia, Frénicle standard form
Index entries for sequences related to magic squares


FORMULA

For n >= 1, let N := 4n = Product_{g} (p_g)^(s_g), where p_g are distinct primes, and W_v(n) := Sum_{i=0..v} (1)^(v+i) * binomial(v+1,i+1) * Product_{g} binomial(s_g+i,i). Then a(n) = 2^(N2) * (2n)!^2 * Sum_{v=0..Sum_{g} s_g} W_v(N)*(W_v(N)+W_{v+1}(N)).  Floor van Lamoen, Aug 16 2001; corrected by Max Alekseyev, Jul 02 2019
For n >= 1, a(n) = 2^(4n2) * (2n)!^2 * A308951(n).  Max Alekseyev, Jul 03 2019


MATHEMATICA

a[n_] := Module[{s, W}, If[n==0, Return[1]]; s = FactorInteger[4n][[All, 2]]; W = Table[Sum[(1)^(Vi1) Binomial[V, i+1] Product[Binomial[s[[g]] + i, i], {g, 1, Length[s]}], {i, 0, V1}], {V, 1, Total[s]+1}]; 2^(4n2) (2n)!^2 Sum[W[[V]] (W[[V]] + W[[V+1]]), {V, 1, Length[W]1}]];
Table[a[n], {n, 0, 8}] (* JeanFrançois Alcover, Jul 03 2019, translated from PARI *)


PROG

(PARI) { A051235(n) = if(n==0, return(1)); my(s=factor(4*n)[, 2], W=vector(vecsum(s)+1, V, sum(i=0, V1, (1)^(Vi1) * binomial(V, i+1) * prod(g=1, #s, binomial(s[g]+i, i)) ))); 2^(4*n2) *(2*n)!^2 * sum(V=1, #W1, W[V]*(W[V]+W[V+1])); } \\ 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.  M. F. Hasler, Oct 20 2018; corrected by Max Alekseyev, Jul 02 2019


CROSSREFS

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


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane


EXTENSIONS

More terms from Floor van Lamoen, Aug 16 2001
Edited by Max Alekseyev, Jul 03 2019


STATUS

approved



