Calculate an n-order determinant:
$\left|\begin{array}{cccccc}1 & 2 & 3 & \cdots & n-1 & n \\ n & 1 & 2 & \cdots & n-2 & n-1 \\ n-1 & n & 1 & \cdots & n-3 & n-2 \\ \vdots & \vdots & \vdots & & \vdots & \vdots \\ 2 & 3 & 4 & \cdots & n & 1\end{array}\right|$
The result should be:
$(-1)^{n-1} \frac{n+1}{2} n^{n-1}$
But I can't get this result by FindSequenceFunction
:
Clear["Global`*"];
a[n_Integer?Positive] := Array[Mod[#2 - #1, n] + 1 &, {n, n}]
detmm[n_] := Det[a[n]]
tab = Table[detmm[k], {k, 1, 20}];
FindSequenceFunction[tab, n]
FindSequenceFunction[{1, -3, 18, -160, 1875, -27216, 470596, -9437184, 215233605, -5500000000, 155624547606, -4829554409472, 163086595857367, -5952860799406080, 233543408203125000, -9799832789158199296, 437950726881001816329, -20766159817517617053696, 1041273502979112415328410, -55050240000000000000000000}, n]
Is this due to the limitations of FindSequenceFunction
or some problems in my method? Is there any other way?
This
is it, right? $\endgroup$FindSequenceFunction
fails, but there's a known sequence. This example seems to fall in this category $\endgroup$FindSequenceFunction
. It's great! $\endgroup$FindSequenceFunction
and might be helpful for them to have a library of sequences that could be included. $\endgroup$