cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A070212 Number of 5 X 5 pandiagonal magic squares with sum n.

Original entry on oeis.org

1, 10, 55, 220, 715, 2001, 4995, 11385, 24090, 47905, 90376, 162955, 282490, 473110, 768570, 1215126, 1875015, 2830620, 4189405, 6089710, 8707501, 12264175, 17035525, 23361975, 31660200, 42436251, 56300310, 73983205, 96354820, 124444540, 159463876, 202831420, 256200285, 321488190
Offset: 0

Views

Author

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

Keywords

Comments

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

Crossrefs

Programs

  • 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
  • Maple
    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
  • Mathematica
    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 *)
  • 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
    

Formula

a(n) = (1/8064) * (n+4)*(n+3)*(n+2)*(n+1)*(n^2+5n+8)*(n^2+5n+42).
G.f.: -(x^4+x^3+x^2+x+1) / (x-1)^9. [Colin Barker, Dec 10 2012]

Extensions

More terms from Benoit Cloitre, May 12 2002
More terms from M. F. Hasler, Oct 23 2018

A160540 The number of distinct n X n panmagic = pandiagonal = diabolic = Nasik squares, not counting rotations, reflections, or row/column cyclings of others, with the additional property that each i X j rectangle, including each "wrap-around" i X j rectangle, where i and j are positive integers whose product is n, also sums to the magic constant A006003(n) = n(n^2+1)/2.

Original entry on oeis.org

1, 0, 0, 3
Offset: 1

Views

Author

Anonymous, May 18 2009

Keywords

Comments

A "row/column cycling" of another square is a square that can be formed by moving any number of rows from the top of the other square to the bottom of it and keeping them in the same order, or by moving any number of columns from the left of it to the right of it and keeping them in the same order, or by doing both. Since these squares are panmagic, and so the "wrap-around" diagonals also must sum to the magic constant, row/column cyclings of a square are not essentially different from that square.

Examples

			a(4) = 3 because there are 3 distinct 4 X 4 panmagic squares, not counting rotations, reflections, or row/column cyclings of others, with the additional property that each 2 X 2 square, including each "wrap around" 2 X 2 square such as the one consisting of a11, a12, a41, and a42, and the one consisting of a11, a14, a41, and a44, also sums to A006003(4) = 4(4^2+1)/2 = 34:
     1  8 10 15       1  8 11 14       1  8 13 12
    12 13  3  6      12 13  2  7      14 11  2  7
     7  2 16  9       6  3 16  9       4  5 16  9
    14 11  5  4      15 10  5  4      15 10  3  6
The following panmagic square does not count because it can be formed from the third panmagic square given above by moving the first column on the left of it to the right of it and then reflecting it in the y-axis:
     1 12 13  8
    14  7  2 11
     4  9 16  5
    15  6  3 10
		

Crossrefs

Cf. A027567.
Showing 1-2 of 2 results.