OFFSET
8,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 8..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
An optimal choice and arrangement is of the following form: det((n, n-5, 1), (2, n-1, n-3), (n-4, 0, n-2)) = 2*(n^3 - 9*n^2 + 34*n - 42). There are 35 other equivalent arrangements corresponding to permutations of rows and columns.
a(n) = 2*n^3 - 18*n^2 + 68*n - 84.
G.f.: 4*x^8*(83 - 200*x + 169*x^2 - 49*x^3)/(1-x)^4. - Colin Barker, Mar 29 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 25 2012
EXAMPLE
a(10)=796 because no larger determinant of a 3 X 3 matrix b(j,k) with distinct elements 0 <= b(j,k) <= 10, j=1..3, k=1..3 can be built than det((10,5,1), (2,9,7), (6,0,8)) = 796.
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {332, 528, 796, 1148}, 40] (* Vincenzo Librandi, Jun 25 2012 *)
PROG
(Magma) I:=[332, 528, 796, 1148]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 25 2012
(PARI) a(n)=2*n^3-18*n^2+68*n-84 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hugo Pfoertner, Aug 24 2004
STATUS
approved