login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A093199 Number of 4 X 4 magic squares with line sum n. 3
1, 8, 48, 200, 675, 1904, 4736, 10608, 21925, 42328, 77328, 134680, 225351, 364000, 570368, 869856, 1295433, 1888296, 2700400, 3795176, 5250795, 7160912, 9638784, 12818000, 16857581, 21942648, 28290640, 36151864 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
A magic square is defined here as a square matrix whose entries are nonnegative integers and whose rows, columns and main diagonals add up to the same number.
LINKS
M. M. Ahmed, Algebraic Combinatorics of Magic Squares, arXiv:math/0405476 [math.CO], 2004.
M. Ahmed, J. De Loera and R. Hemmecke, Polyhedral Cones of Magic Cubes and Squares, arXiv:math/0201108 [math.CO], 2002.
Maya Ahmed, Jesús De Loera and Raymond Hemmecke, Polyhedral cones of magic cubes and squares, Discrete and Computational Geometry, Volume 25, 2003, pp. 25-41.
Matthias Beck, The number of "magic" squares and hypercubes, arXiv:math/0201013 [math.CO], 2002-2005.
V. Baldoni et al., A User's Guide for LattE integrale. Section 5.1 Counting Magic Squares.
FORMULA
G.f.: (x^8+4x^7+18x^6+36x^5+50x^4+36x^3+18x^2+4x+1)/(1-x)^4/(1-x^2)^4 [Ahmed]. - sent by R. J. Mathar, Jan 25 2007
a(n) = 4*a(n-1) - 2*a(n-2) - 12*a(n-3) + 17*a(n-4) + 8*a(n-5) - 28*a(n-6) + 8*a(n-7) + 17*a(n-8) - 12*a(n-9) - 2*a(n-10) + 4*a(n-11) - a(n-12) for n > 11. - Chai Wah Wu, Jan 15 2019
MATHEMATICA
a[n_] := (1/960)(n + 2)(2 n^6 + 24 n^5 + 130 n^4 + 400 n^3 + 5 (-1)^n n^2 + 763 n^2 + 20 (-1)^n n + 876 n + 45 (-1)^n + 435);
Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Jan 18 2019 *)
PROG
(PARI) a(n)=if(n%2==0, 1/480*n^7+7/240*n^6+89/480*n^5+11/16*n^4+49/30*n^3+38/15*n^2+71/30*n+1, 1/480*n^7+7/240*n^6+89/480*n^5+11/16*n^4+779/480*n^3+593/240*n^2+1051/480*n+13/16))
CROSSREFS
Sequence in context: A247727 A187174 A128796 * A263507 A261975 A087914
KEYWORD
nonn
AUTHOR
Ralf Stephan, Apr 22 2004
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 16:13 EDT 2024. Contains 371749 sequences. (Running on oeis4.)