OFFSET
1,4
COMMENTS
In a reduced magic square the row, column, and two diagonal sums must all be equal (the "magic sum") and the minimum entry is 0. The maximum entry is necessarily even and = (2/3)*(magic sum).
a(n) is a quasipolynomial with period 6.
LINKS
Thomas Zaslavsky, Table of n, a(n) for n = 1..10000.
Matthias Beck and Thomas Zaslavsky, Six Little Squares and How Their Numbers Grow , J. Int. Seq. 13 (2010), 10.6.2.
Matthias Beck and Thomas Zaslavsky, "Six Little Squares and How their Numbers Grow" Web Site: Maple worksheets and supporting documentation.
Index entries for linear recurrences with constant coefficients, signature (0,1,1,0,-1).
FORMULA
a(n) = 8*A174257(n).
G.f.: 8*x^4 * (2*x+1) / ((x^2-1) * (x^3-1)). [amended by Georg Fischer, Apr 17 2020]
a(n) = 2*(6*n - 13 - 8*cos(2*n*Pi/3) - 3*cos(n*Pi))/3. - Wesley Ivan Hurt, Oct 04 2018
MATHEMATICA
Take[CoefficientList[Series[(8x^8 (2x^2+1))/((x^4-1)(x^6-1)), {x, 0, 120}], x], {1, -1, 2}] (* Harvey P. Dale, Aug 07 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Thomas Zaslavsky, Mar 14 2010
STATUS
approved