OFFSET
0,6
LINKS
Guoce Xin, Constructing all magic squares of order three, Discrete Math., 308 (2008), 3393-3398.
Index entries for linear recurrences with constant coefficients, signature (0,1,1,0,0,0,-1,-1,0,1)
FORMULA
a(n) = 13/60*n^2 - 3/5*n + O(1). - Charles R Greathouse IV, Jun 03 2026
PROG
(PARI) a(n)=(13*n^2-36*n+[0, 23, 20, -9, -4, 35, -12, 35, -4, -9, 20, 23, 0, 11, -4, 15, 8, 35, -24, 11, 20, 3, 20, 11, -24, 35, 8, 15, -4, 11][n%30+1])/60 \\ Charles R Greathouse IV, Jun 03 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 20 2008
STATUS
approved
