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.
%I A108578 #25 Sep 08 2022 08:45:19 %S A108578 0,0,0,0,8,24,32,56,80,104,136,176,208,256,304,352,408,472,528,600, %T A108578 672,744,824,912,992,1088,1184,1280,1384,1496,1600,1720,1840,1960, %U A108578 2088,2224,2352,2496,2640,2784,2936,3096,3248,3416,3584,3752,3928,4112,4288 %N A108578 Number of 3 X 3 magic squares with magic sum 3n. %C A108578 Contribution from _Thomas Zaslavsky_, Mar 12 2010: (Start) %C A108578 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 A108578 a(n) is given by a quasipolynomial of period 6. (End) %H A108578 T. Zaslavsky, <a href="/A108578/b108578.txt">Table of n, a(n) for n = 1..10000</a>. %H A108578 M. Beck and T. Zaslavsky, <a href="http://arXiv.org/abs/math.CO/0506315">An enumerative geometry for magic and magilatin labellings</a>, Ann. Combinatorics, 10 (2006), no. 4, 395-413. MR 2007m:05010. Zbl 1116.05071. - _Thomas Zaslavsky_, Jan 29 2010 %H A108578 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 A108578 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,0,-1, -1,1). %F A108578 G.f.: [8*x^5*(1+2*x)] / [(1-x)*(1-x^2)*(1-x^3)]. %F A108578 a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6). - _Vincenzo Librandi_, Sep 01 2018 %e A108578 a(5) = 8 because there are 8 3 X 3 magic squares with entries 1,...,9 and magic sum 15. %t A108578 LinearRecurrence[{1, 1, 0, -1, -1, 1}, {0, 0, 0, 0, 8, 24}, 50] (* _Jean-François Alcover_, Sep 01 2018 *) %t A108578 CoefficientList[Series[8 x^4 (1 + 2 x) / ((1 - x) (1 - x^2) (1 - x^3)), {x, 0, 50}], x] (* _Vincenzo Librandi_, Sep 01 2018 *) %o A108578 (PARI) a(n)=(1/9)*(2*n^2-32*n+[144,78,120,126,96,102][(n%18)/3+1]) %o A108578 (PARI) x='x+O('x^99); concat(vector(4), Vec(8*x^5*(1+2*x)/((1-x)*(1-x^2)*(1-x^3)))) \\ _Altug Alkan_, Sep 01 2018 %o A108578 (Magma) I:=[0,0,0,0,8,24]; [n le 6 select I[n] else Self(n-1)+Self(n-2)-Self(n-4)-Self(n-5)+Self(n-6): n in [1..60]]; // _Vincenzo Librandi_, Sep 01 2018 %Y A108578 Equals 8 times the second differences of A055328. %Y A108578 Cf. A108576, A108577, A108579. %K A108578 nonn %O A108578 1,5 %A A108578 _Thomas Zaslavsky_ and _Ralf Stephan_, Jun 11 2005 %E A108578 Edited by _N. J. A. Sloane_, Feb 05 2010 %E A108578 Corrected g.f. to account for previous change in parameter n from magic sum s to s/3; by _Thomas Zaslavsky_, Mar 12 2010