login
Number of 5 X 5 pandiagonal magic squares with sum n.
2

%I #33 Mar 19 2022 13:45:56

%S 1,10,55,220,715,2001,4995,11385,24090,47905,90376,162955,282490,

%T 473110,768570,1215126,1875015,2830620,4189405,6089710,8707501,

%U 12264175,17035525,23361975,31660200,42436251,56300310,73983205,96354820,124444540,159463876,202831420,256200285,321488190

%N Number of 5 X 5 pandiagonal magic squares with sum n.

%C In contrast to other definitions, a magic square may contain here any nonnegative integers, not necessarily distinct. For example, the 10 solutions for n = 1 are the 10 permutation matrices of size 5 X 5 which are pandiagonal in the sense that any of the 10 (principal or broken) diagonals has exactly one 1 and four 0's. - _M. F. Hasler_, Oct 23 2018

%H Muniru A Asiru, <a href="/A070212/b070212.txt">Table of n, a(n) for n = 0..5000</a>

%H M. Ahmed, J. De Loera, and R. Hemmecke, <a href="https://arxiv.org/abs/math/0201108">Polyhedral Cones of Magic Cubes and Squares</a>, arXiv:math/0201108 [math.CO], 2002.

%H Maya Ahmed, Jesús De Loera and Raymond Hemmecke, <a href="https://doi.org/10.1007/978-3-642-55566-4_2">Polyhedral cones of magic cubes and squares</a>, in Discrete and Computational Geometry, Springer, Berlin, 2003, pp. 25-41.

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (9,-36,84,-126,126,-84,36,-9,1).

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

%F a(n) = (1/8064) * (n+4)*(n+3)*(n+2)*(n+1)*(n^2+5n+8)*(n^2+5n+42).

%F G.f.: -(x^4+x^3+x^2+x+1) / (x-1)^9. [_Colin Barker_, Dec 10 2012]

%p seq(coeff(series(-(x^4+x^3+x^2+x+1)/(x-1)^9,x,n+1), x, n), n = 0 .. 35); # _Muniru A Asiru_, Oct 23 2018

%t LinearRecurrence[{9,-36,84,-126,126,-84,36,-9,1},{1,10,55,220,715,2001,4995,11385,24090},40] (* _Harvey P. Dale_, Mar 13 2018 *)

%o (PARI) apply( A070212(n)=1/8064*(n+4)*(n+3)*(n+2)*(n+1)*(n^2+5*n+8)*(n^2+5*n+42), [0..20]) \\ Edited by _M. F. Hasler_, Oct 23 2018

%o (GAP) a:=[1, 10, 55, 220, 715, 2001, 4995, 11385, 24090];; for n in [10..36] do a[n]:=9*a[n-1]-36*a[n-2]+84*a[n-3]-126*a[n-4]+126*a[n-5]-84*a[n-6]+36*a[n-7]-9*a[n-8]+a[n-9]; od; a; # _Muniru A Asiru_, Oct 23 2018

%Y Cf. A027567, A014820, A111158, A053494.

%K nonn,easy

%O 0,2

%A Sharon Sela (sharonsela(AT)hotmail.com), May 07 2002

%E More terms from _Benoit Cloitre_, May 12 2002

%E More terms from _M. F. Hasler_, Oct 23 2018