login
Number of symmetry classes of 3 X 3 magic squares (with distinct positive entries) having magic sum 3n.
10

%I #32 May 27 2023 20:38:21

%S 0,0,0,0,1,3,4,7,10,13,17,22,26,32,38,44,51,59,66,75,84,93,103,114,

%T 124,136,148,160,173,187,200,215,230,245,261,278,294,312,330,348,367,

%U 387,406,427,448,469,491,514,536,560,584,608,633,659,684,711,738,765,793,822,850

%N Number of symmetry classes of 3 X 3 magic squares (with distinct positive entries) having magic sum 3n.

%C A magic square has distinct positive integers in its cells, whose sum is the same (the "magic sum") along any row, column, or main diagonal.

%C a(n) is given by a quasipolynomial of period 6.

%C It appears that A108579(n) is the number of ordered triples (w,x,y) with components all in {1,...,n} and w+n=2x+3y, as in the Mathematica section. For related sequences, see A211422. - _Clark Kimberling_, Apr 15 2012

%H T. Zaslavsky, <a href="/A108579/b108579.txt">Table of n, a(n) for n = 1..10000</a>

%H Matthias Beck and Thomas Zaslavsky, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Zaslavsky/sls.html">Six little squares and how their numbers grow</a>, Journal of Integer Sequences, 13 (2010), Article 10.6.2.

%H Matthias Beck and Thomas Zaslavsky, <a href="https://people.math.binghamton.edu/zaslav/Tpapers/SLSfiles/">Six little squares and how their numbers grow: Maple Worksheets and Supporting Documentation</a>.

%H Yu. V. Chebrakov, <a href="http://chebrakov.narod.ru/bbb-2.6.pdf">Section 2.6.3</a> in "Theory of Magic Matrices. Issue TMM-1.", 2008. (in Russian)

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,0,-1,-1,1).

%F a(n) = floor((1/4)*(n-2)^2)-floor((1/3)*(n-1)). - _Mircea Merca_, Oct 08 2013

%F G.f.: x^5*(1+2*x)/((1-x)*(1-x^2)*(1-x^3)).

%e a(5) = 1 because there is a unique 3 X 3 magic square, up to symmetry, using the first 9 positive integers.

%t (* This program generates a sequence described in the Comments section *)

%t t[n_] := t[n] = Flatten[Table[-w^2 + x*y + n, {w, 1, n}, {x, 1, n}, {y, 1, n}]]

%t c[n_] := Count[t[n], 0]

%t t = Table[c[n], {n, 1, 80}] (* A211506 *)

%t (* _Clark Kimberling_, Apr 15 2012 *)

%Y Cf. A108576, A108577, A108578.

%Y Nonzero entries are the second differences of A055328.

%K nonn,easy

%O 1,6

%A _Thomas Zaslavsky_, Jun 11 2005

%E Edited by _N. J. A. Sloane_, Oct 04 2010